Skip to content

Commit c6e4d4a

Browse files
Enhance release workflow to create and upload GitHub releases for tagged versions
1 parent bbf511f commit c6e4d4a

File tree

1 file changed

+42
-1
lines changed

1 file changed

+42
-1
lines changed

.github/workflows/release.yml

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,25 @@ on:
66
tags:
77
- "v*"
88

9+
permissions:
10+
contents: write
11+
912
jobs:
13+
create_release:
14+
if: startsWith(github.ref, 'refs/tags/')
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Create GitHub Release
18+
uses: softprops/action-gh-release@v2
19+
with:
20+
tag_name: ${{ github.ref_name }}
21+
name: ${{ github.ref_name }}
22+
draft: false
23+
prerelease: false
24+
generate_release_notes: true
25+
1026
publish:
27+
needs: create_release
1128
runs-on: ubuntu-latest
1229
strategy:
1330
fail-fast: false
@@ -59,9 +76,33 @@ jobs:
5976
echo "exe=$EXE" >> "$GITHUB_OUTPUT"
6077
echo "Executable: $EXE"
6178
79+
- name: Prepare asset for Release
80+
id: package
81+
shell: bash
82+
env:
83+
RID: ${{ matrix.rid }}
84+
TAG: ${{ github.ref_name }}
85+
run: |
86+
set -euo pipefail
87+
EXT=""
88+
if [[ "$RID" == win* ]]; then EXT=".exe"; fi
89+
BASENAME="mcp-server-stdio-${TAG}-${RID}${EXT}"
90+
SRC="${{ steps.publish.outputs.exe }}"
91+
DEST="${{ steps.publish.outputs.publish_dir }}/$BASENAME"
92+
cp "$SRC" "$DEST"
93+
echo "asset=$DEST" >> "$GITHUB_OUTPUT"
94+
echo "Packaged asset: $DEST"
95+
96+
- name: Upload asset to GitHub Release
97+
uses: softprops/action-gh-release@v2
98+
with:
99+
tag_name: ${{ github.ref_name }}
100+
files: ${{ steps.package.outputs.asset }}
101+
fail_on_unmatched_files: true
102+
62103
- name: Upload executable artifact
63104
uses: actions/upload-artifact@v4
64105
with:
65106
name: io-aerosapce-mcp-${{ github.ref_name }}-${{ matrix.rid }}
66-
path: ${{ steps.publish.outputs.exe }}
107+
path: ${{ steps.package.outputs.asset }}
67108
if-no-files-found: error

0 commit comments

Comments
 (0)