mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2026-05-08 00:01:41 +08:00
Replace actions/checkout from v4 to v6 across workflows to prepare for the GitHub Actions Node.js 24 migration and avoid Node.js 20 deprecation risk.
78 lines
2.0 KiB
YAML
78 lines
2.0 KiB
YAML
name: Release builds
|
|
|
|
on:
|
|
release:
|
|
types: [ published ]
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
# Set release to prerelease first
|
|
prerelease:
|
|
name: Set Prerelease
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Prerelease
|
|
uses: irongut/EditRelease@v1.2.0
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
id: ${{ github.event.release.id }}
|
|
prerelease: true
|
|
|
|
# Main release job for all platforms
|
|
release:
|
|
needs: prerelease
|
|
strategy:
|
|
matrix:
|
|
build-type: [ 'standard', 'lite' ]
|
|
target-platform: [ '', 'android', 'freebsd', 'linux_musl', 'linux_musl_arm' ]
|
|
name: Release ${{ matrix.target-platform && format('{0} ', matrix.target-platform) || '' }}${{ matrix.build-type == 'lite' && 'Lite' || '' }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- name: Free Disk Space (Ubuntu)
|
|
if: matrix.target-platform == ''
|
|
uses: jlumbroso/free-disk-space@main
|
|
with:
|
|
tool-cache: false
|
|
android: true
|
|
dotnet: true
|
|
haskell: true
|
|
large-packages: true
|
|
docker-images: true
|
|
swap-storage: true
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.25.0'
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install dependencies
|
|
if: matrix.target-platform == ''
|
|
run: |
|
|
sudo snap install zig --classic --beta
|
|
docker pull crazymax/xgo:latest
|
|
go install github.com/crazy-max/xgo@latest
|
|
sudo apt install upx
|
|
|
|
- name: Build
|
|
run: |
|
|
bash build.sh release ${{ matrix.build-type == 'lite' && 'lite' || '' }} ${{ matrix.target-platform }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
FRONTEND_REPO: ${{ vars.FRONTEND_REPO }}
|
|
|
|
- name: Upload assets
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
files: build/compress/*
|
|
prerelease: false
|
|
tag_name: ${{ github.event.release.tag_name }}
|
|
|