Build and release #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and release | |
on: | |
release: | |
types: [created] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: "18.x" | |
registry-url: "https://registry.npmjs.org" | |
scope: "@aikidosec" | |
- run: make install | |
- name: Get the version | |
id: get_version | |
run: echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//} | |
- run: cd library && npm --no-git-tag-version version ${{ steps.get_version.outputs.tag }} | |
- run: make build | |
- run: cp LICENSE library && cp README.md library | |
- run: cd library && npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} |