Skip to content

Commit 02e5895

Browse files
author
Mohammod Al Amin Ashik
committed
fix(ci): properly extract tag from release-plz releases output
- release-plz outputs releases as JSON array, not as individual outputs - Extract tag and version from releases[0] using jq - Pass tag directly to tauri-action to find existing release - This fixes the build-release job not uploading to GitHub Release
1 parent 79f4470 commit 02e5895

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

.github/workflows/release.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ jobs:
4646
outputs:
4747
releases_created: ${{ steps.release-plz.outputs.releases_created }}
4848
version: ${{ steps.get-version.outputs.version }}
49+
tag: ${{ steps.get-version.outputs.tag }}
4950
steps:
5051
- uses: actions/checkout@v4
5152
with:
@@ -62,14 +63,19 @@ jobs:
6263
env:
6364
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6465

65-
- name: Extract version from tag
66+
- name: Extract version from releases output
6667
id: get-version
6768
if: steps.release-plz.outputs.releases_created == 'true'
69+
env:
70+
RELEASES: ${{ steps.release-plz.outputs.releases }}
6871
run: |
69-
TAG="${{ steps.release-plz.outputs.tag }}"
70-
VERSION="${TAG#v}"
72+
# Parse the releases JSON to get tag and version
73+
# Example: [{"package_name":"mcpmux","tag":"v0.1.0","version":"0.1.0"}]
74+
TAG=$(echo "$RELEASES" | jq -r '.[0].tag')
75+
VERSION=$(echo "$RELEASES" | jq -r '.[0].version')
76+
echo "tag=$TAG" >> $GITHUB_OUTPUT
7177
echo "version=$VERSION" >> $GITHUB_OUTPUT
72-
echo "Released version: $VERSION"
78+
echo "Released tag: $TAG, version: $VERSION"
7379
7480
# ─────────────────────────────────────────────────────────────
7581
# Build Release: Build Tauri app when release is created
@@ -160,7 +166,8 @@ jobs:
160166
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
161167
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
162168
with:
163-
tagName: v${{ needs.release.outputs.version }}
169+
# Use tagName to find and upload to the existing release created by release-plz
170+
tagName: ${{ needs.release.outputs.tag }}
164171
releaseName: 'McpMux v${{ needs.release.outputs.version }}'
165172
releaseBody: '' # Release notes already created by release-plz
166173
releaseDraft: false

0 commit comments

Comments
 (0)