Created
October 7, 2021 15:38
-
-
Save roerohan/2c6be97f70aa9067102fda93cd829883 to your computer and use it in GitHub Desktop.
GitHub action to run semantic-release
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: Release to NPM Registry | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
registry-url: https://registry.npmjs.org/ | |
- name: Install dependencies | |
run: npm install | |
- name: Build package | |
run: npm run build | |
- name: Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: npx semantic-release |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment