publish #54
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: publish | |
on: | |
release: | |
types: [published] | |
jobs: | |
publish-npm: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 14 | |
registry-url: https://registry.npmjs.org/ | |
- run: npm install | |
- run: git submodule update --init | |
- run: npm run test-ci | |
- name: Publish beta version to npm | |
if: "github.event.release.prerelease" | |
run: npm publish --tag beta | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Publish to npm | |
if: "!github.event.release.prerelease" | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Commit bundles to ajv-dist | |
run: ./scripts/publish-bundles | |
env: | |
GH_TOKEN_PUBLIC: ${{ secrets.GH_TOKEN_PUBLIC }} | |
GIT_USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }} | |
GIT_USER_NAME: ${{ secrets.GIT_USER_NAME }} |