Skip to content

Commit

Permalink
ci: publish package on version
Browse files Browse the repository at this point in the history
  • Loading branch information
hans00 committed Apr 29, 2024
1 parent a05b0b1 commit 56e9a54
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Release
on:
release:
types: [created]
tags:
- v*
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
publish:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'release'
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -96,3 +96,11 @@ jobs:
run: yarn publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Draft release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: true

0 comments on commit 56e9a54

Please sign in to comment.