Skip to content

Commit

Permalink
Trigger release workflow on tag push (#25)
Browse files Browse the repository at this point in the history
feat: release workflow

Signed-off-by: KeisukeYamashita <19yamashita15@gmail.com>
  • Loading branch information
KeisukeYamashita authored Apr 13, 2023
1 parent 190f6bb commit f890739
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
name: Publish package to GitHub Packages
name: Release
on:
release:
types: [created]
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true

jobs:
publish:
environment: Release
Expand All @@ -14,6 +17,7 @@ jobs:
packages: write
steps:
- uses: actions/checkout@v3

- uses: actions/cache@v3
with:
path: ~/.npm
Expand All @@ -22,17 +26,23 @@ jobs:
${{ runner.os }}-build-node-
${{ runner.os }}-build-
${{ runner.os }}-
- uses: actions/setup-node@v3
with:
node-version: 16.x
registry-url: https://registry.npmjs.org

- run: npm i

- run: npm run build
# Clean up

- run: rm -r node_modules

- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- uses: ncipollo/release-action@v1
with:
generateReleaseNotes: true

0 comments on commit f890739

Please sign in to comment.