Skip to content

Commit 5c4fa1b

Browse files
authored
Merge pull request #68 from podnetwork/feat/sdk-release
Create sdk releases from github CI
2 parents 17795e6 + 3a12124 commit 5c4fa1b

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/release.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Release All SDKs
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
package-and-release:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Determine version
19+
id: meta
20+
run: |
21+
ref="${GITHUB_REF}"
22+
sha="${GITHUB_SHA}"
23+
version="${ref#refs/tags/}"
24+
25+
echo "version=$version" >> $GITHUB_OUTPUT
26+
27+
- name: Package all SDKs
28+
run: |
29+
mkdir -p dist
30+
for dir in *-sdk; do
31+
if [ -d "$dir" ]; then
32+
archive="dist/${dir}-${{ steps.meta.outputs.version }}.tar.gz"
33+
echo "Packing $dir → $archive"
34+
tar --exclude-vcs -czf "$archive" -C "$dir" .
35+
fi
36+
done
37+
38+
- name: Create GitHub Release
39+
uses: softprops/action-gh-release@v2
40+
with:
41+
tag_name: ${{ steps.meta.outputs.version }}
42+
name: "SDK Release ${{ steps.meta.outputs.version }}"
43+
overwrite: true
44+
files: dist/*.tar.gz
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}

0 commit comments

Comments
 (0)