Skip to content

Instantly share code, notes, and snippets.

@roerohan
Created October 7, 2021 15:38
Show Gist options
  • Save roerohan/2c6be97f70aa9067102fda93cd829883 to your computer and use it in GitHub Desktop.
Save roerohan/2c6be97f70aa9067102fda93cd829883 to your computer and use it in GitHub Desktop.
GitHub action to run semantic-release
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