Skip to content

Commit 40d4565

Browse files
Tom Panclaude
andcommitted
Fix workflow_dispatch to auto-create release with tag
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent fbfa57d commit 40d4565

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,21 @@ on:
88
jobs:
99
upload:
1010
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
1113
steps:
1214
- uses: actions/checkout@v4
1315

14-
- name: Upload Template.docx to release
16+
- name: Upload to existing release
17+
if: github.event_name == 'release'
1518
uses: softprops/action-gh-release@v2
1619
with:
1720
files: Template.docx
21+
22+
- name: Create release and upload
23+
if: github.event_name == 'workflow_dispatch'
24+
env:
25+
GH_TOKEN: ${{ github.token }}
26+
run: |
27+
tag="v$(date +%Y%m%d)"
28+
gh release create "$tag" Template.docx --title "$tag" --generate-notes

0 commit comments

Comments
 (0)