Skip to content

Commit

Permalink
ci: add GitHub Actions workflow for publishing to NPM and GitHub Rele…
Browse files Browse the repository at this point in the history
…ases
  • Loading branch information
microshine committed Nov 22, 2024
1 parent 8331891 commit 41474c1
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22.x"
cache: "yarn"
- name: Install dependencies
run: yarn
- name: Build
run: npm run build
- name: Publish to NPM
run: |
npm set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
- name: Publish to GitHub
uses: softprops/action-gh-release@v2
with:
make_latest: true
generate_release_notes: true

0 comments on commit 41474c1

Please sign in to comment.