Skip to content

Commit b25684f

Browse files
author
xychen
committed
Add release workflow
1 parent 4f5893f commit b25684f

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/build.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
on:
22
push:
33
pull_request:
4+
release:
5+
types: [published]
46

57
permissions:
68
contents: write
@@ -148,3 +150,34 @@ jobs:
148150
- name: Deploy to GitHub Pages
149151
uses: actions/deploy-pages@v4
150152
id: deploy
153+
154+
publish-github:
155+
if: github.event_name == 'release'
156+
runs-on: ubuntu-latest
157+
needs: build
158+
steps:
159+
- name: Download artifact
160+
uses: actions/download-artifact@v4
161+
with:
162+
pattern: commands-mcp_*
163+
164+
- name: Pack
165+
run: |
166+
mkdir -p assets
167+
for dir in commands-mcp_*; do
168+
pushd ${dir}
169+
if [[ "${dir}" == *"win32"* ]]; then
170+
zip -9 ../assets/${dir}.zip commands-mcp.exe
171+
else
172+
chmod +x commands-mcp
173+
tar -caf ../assets/${dir}.tar.xz commands-mcp
174+
fi
175+
popd
176+
done
177+
178+
- name: Upload release assets
179+
uses: svenstaro/[email protected]
180+
with:
181+
file: assets/*
182+
file_glob: true
183+
make_latest: false

0 commit comments

Comments
 (0)