diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9907785..9da3a34 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,7 +1,7 @@ name: Release on: - release: - types: [created] + tags: + - v* workflow_dispatch: jobs: @@ -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: @@ -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