1.1.0-beta1 #2
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 to npm | |
on: | |
release: | |
types: [created] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v3 | |
- name: Setup NodeJS LTS version | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18.12.0" | |
- name: Setup the project | |
run: yarn install | |
- name: Generate production build | |
run: yarn build | |
- name: Publish the package on NPM | |
uses: JS-DevTools/npm-publish@v1 | |
with: | |
access: "public" | |
token: ${{ secrets.NPM_TOKEN }} | |
tag: ${{ github.event.release.prerelease && 'beta' || 'latest' }} |