Skip to content

Commit 146e41f

Browse files
authored
Create release CI (#67)
1 parent 104bd6c commit 146e41f

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
paths:
6+
- '**/*.sdk/**'
7+
workflow_dispatch:
8+
9+
jobs:
10+
release:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v3
15+
16+
- name: Prepare for release
17+
run: |
18+
for i in *.sdk; do
19+
if [[ -d $i ]]; then
20+
tar -cJvf $i.tar.xz $i && echo $(ls *.tar.xz)
21+
fi
22+
done
23+
24+
- name: Publish release
25+
env:
26+
GH_TOKEN: ${{ github.token }}
27+
run: |
28+
TAG="${GITHUB_REF##*/}-${GITHUB_SHA:0:7}"
29+
gh release create "$TAG" --draft --title "Draft Release"
30+
gh release upload "$TAG" ./*.tar.xz

0 commit comments

Comments
 (0)