Skip to content

Commit

Permalink
feat: setup auto release #4
Browse files Browse the repository at this point in the history
Signed-off-by: seven <[email protected]>
  • Loading branch information
Blankll committed Jan 24, 2024
1 parent 9878ad9 commit 0cdc3cb
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: package release

on:
release:
branches: [master]
types: [created]
push:
branches: [master]

jobs:
build:
Expand All @@ -17,7 +17,23 @@ jobs:
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies and build 🔧
run: npm ci && npm run build
- name: Generate changelog
uses: jaywcjlove/changelog-generator@main
id: changelog
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Build Release
uses: jaywcjlove/create-tag-action@main
id: tag_release
with:
release: true
token: ${{ secrets.GITHUB_TOKEN }}
body: |
${{ steps.changelog.outputs.compareurl }}
${{ steps.changelog.outputs.changelog }}
- name: Publish package on NPM 📦
if: steps.tag_release.outputs.successful
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 0cdc3cb

Please sign in to comment.