-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (43 loc) · 1.71 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
on:
push:
tags:
- '*'
name: Release a New Version
jobs:
releaseandpublish:
name: Release on Github
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: false
- name: ⎔ Setup bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.1.45
- name: 📥 Download deps
run: bun install --frozen-lockfile
- name: 🔨 Compiling the different versions
run: make build-all
- name: 🏷 Create GitHub Release
run: |
TAG_NAME=${GITHUB_REF_NAME}
TAG_MESSAGE=$(git tag -l --format='%(contents)' "$TAG_NAME")
gh release create "${TAG_NAME}" --title "Release ${TAG_NAME}" --notes "${TAG_MESSAGE}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 🚀 Upload Assets
run: |
ASSET_PLATFORMS=("bun-linux-x64" "bun-linux-arm64" "bun-windows-x64.exe" "bun-darwin-x64" "bun-darwin-arm64")
for platform in "${ASSET_PLATFORMS[@]}"; do
if [ -f "crystallize-$platform" ]; then
gh release upload "${GITHUB_REF_NAME}" "crystallize-$platform" --clobber
echo "✅ Uploaded file for platform $platform"
else
echo "❌ File for platform $platform not found, skipping."
fi
done
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}