Skip to content

Commit a215c52

Browse files
pszymkowiakclaude
andauthored
fix: release workflow binary upload when called via workflow_call (#10)
The event_name is inherited from the caller (push), not workflow_call, so the version extraction and upload conditions never matched. Use inputs.tag directly which works for both workflow_call and workflow_dispatch, with fallback to release event tag. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 89be0d6 commit a215c52

1 file changed

Lines changed: 4 additions & 20 deletions

File tree

.github/workflows/release.yml

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,11 @@ jobs:
100100
- name: Get version
101101
id: version
102102
run: |
103-
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
104-
echo "version=${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT
105-
elif [ "${{ github.event_name }}" = "workflow_call" ]; then
106-
echo "version=${{ inputs.tag }}" >> $GITHUB_OUTPUT
107-
elif [ "${{ github.event_name }}" = "release" ]; then
108-
echo "version=${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT
103+
TAG="${{ inputs.tag }}"
104+
if [ -z "$TAG" ]; then
105+
TAG="${{ github.event.release.tag_name }}"
109106
fi
107+
echo "version=$TAG" >> $GITHUB_OUTPUT
110108
111109
- name: Flatten artifacts
112110
run: |
@@ -119,23 +117,9 @@ jobs:
119117
sha256sum * > checksums.txt
120118
121119
- name: Upload Release Assets
122-
if: github.event_name == 'release' || github.event_name == 'workflow_call'
123120
uses: softprops/action-gh-release@v2
124121
with:
125122
tag_name: ${{ steps.version.outputs.version }}
126123
files: release/*
127124
env:
128125
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
129-
130-
- name: Create Release
131-
if: github.event_name == 'workflow_dispatch'
132-
uses: softprops/action-gh-release@v2
133-
with:
134-
tag_name: ${{ steps.version.outputs.version }}
135-
name: vox ${{ steps.version.outputs.version }}
136-
draft: false
137-
prerelease: false
138-
generate_release_notes: true
139-
files: release/*
140-
env:
141-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)