Publish package #38
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 package | |
on: | |
release: | |
types: [created] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
- name: CI | |
run: | | |
yarn install --frozen-lockfile --ignore-optional | |
yarn build | |
yarn lint | |
yarn test | |
publish-npmjs: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
registry-url: https://registry.npmjs.org/ | |
- run: | | |
yarn build | |
yarn publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
publish-gpr: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
always-auth: true | |
registry-url: https://npm.pkg.github.com/ | |
- name: Publish to GitHub packages repository | |
run: | | |
yarn build | |
yarn publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} |