Skip to content

Commit 77fe422

Browse files
authored
Create build.yaml
1 parent c9e860e commit 77fe422

1 file changed

Lines changed: 66 additions & 0 deletions

File tree

.github/workflows/build.yaml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Release All Platforms
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
inputs:
8+
version:
9+
description: 'Release tag(例如 v1.5.0 或 nightly-20251129)'
10+
required: true
11+
type: string
12+
13+
permissions:
14+
contents: write
15+
16+
jobs:
17+
# Main release job for all platforms
18+
release:
19+
runs-on: ubuntu-latest
20+
steps:
21+
22+
- name: Free Disk Space (Ubuntu)
23+
if: matrix.target-platform == ''
24+
uses: jlumbroso/free-disk-space@main
25+
with:
26+
tool-cache: false
27+
android: true
28+
dotnet: true
29+
haskell: true
30+
large-packages: true
31+
docker-images: true
32+
swap-storage: true
33+
34+
- name: Setup Go
35+
uses: actions/setup-go@v5
36+
with:
37+
go-version: '1.25.0'
38+
39+
- name: Checkout
40+
uses: actions/checkout@v4
41+
with:
42+
fetch-depth: 0
43+
44+
- name: Install dependencies
45+
run: |
46+
sudo snap install zig --classic --beta
47+
docker pull crazymax/xgo:latest
48+
go install github.com/crazy-max/xgo@latest
49+
sudo apt install upx
50+
51+
- name: Build
52+
run: |
53+
bash build.sh release ${{ matrix.build-type == 'lite' && 'lite' || '' }} ${{ matrix.target-platform }}
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
57+
- name: Upload assets
58+
uses: softprops/action-gh-release@v2
59+
with:
60+
files: build/compress/*
61+
prerelease: false
62+
tag_name: ${{ inputs.version }}
63+
64+
65+
66+

0 commit comments

Comments
 (0)