Skip to content

Commit 440dcd0

Browse files
committed
Add release.yml
1 parent 4821872 commit 440dcd0

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,5 +111,5 @@ jobs:
111111
- name: Upload artifact
112112
uses: actions/upload-artifact@v4
113113
with:
114-
name: schemadump-${{ runner.os }}
114+
name: schemadump-${{ matrix.os_short }}
115115
path: schemadump/build/package

.github/workflows/release.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish release
2+
on: workflow_dispatch
3+
permissions:
4+
contents: write
5+
jobs:
6+
release:
7+
runs-on: ubuntu-latest
8+
name: Release
9+
steps:
10+
- name: Download artifacts
11+
uses: actions/download-artifact@v4
12+
13+
- name: Package
14+
run: |
15+
version=`echo $GITHUB_REF | sed "s/refs\/tags\///"`
16+
ls -Rall
17+
if [ -d "./schemadump-linux/" ]; then
18+
cd ./schemadump-linux/
19+
tar -czf ../schemadump-${version}-linux.tar.gz *
20+
cd -
21+
fi
22+
if [ -d "./schemadump-windows/" ]; then
23+
cd ./schemadump-windows/
24+
zip -r ../schemadump-${version}-windows.zip *
25+
cd -
26+
fi
27+
28+
- name: Release
29+
uses: softprops/action-gh-release@v2
30+
with:
31+
draft: true
32+
files: |
33+
schemadump-*

0 commit comments

Comments
 (0)