Skip to content

Commit

Permalink
use workflow_run
Browse files Browse the repository at this point in the history
  • Loading branch information
getzze committed Nov 12, 2024
1 parent 4d398a4 commit c8fc1dc
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
push:
tags:
- '*'
workflow_run:
workflows: ["Tag release"]
types:
- completed
release:
types:
- published
Expand Down Expand Up @@ -32,7 +36,9 @@ jobs:
name: Make a GitHub Release
needs: [build-package]
# only publish a Github release on push tag
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
if: |
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/'))
|| github.event_name == 'workflow_run'
runs-on: ubuntu-latest

permissions:
Expand All @@ -54,7 +60,6 @@ jobs:
uses: softprops/action-gh-release@v2
with:
files: dist/*
tag_name: ${{ github.event.inputs.version }}
generate_release_notes: true
draft: true

Expand Down

0 comments on commit c8fc1dc

Please sign in to comment.