Skip to content

Release a New Version #14

Release a New Version

Release a New Version #14

Workflow file for this run

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 }}