Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
68 lines
2.1 KiB
YAML
68 lines
2.1 KiB
YAML
name: Release Build
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "*"
|
|
|
|
jobs:
|
|
populate-darwin-sysroot:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v4
|
|
- name: Cache Darwin sysroot
|
|
id: cache-sysroot
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
.sysroot/darwin.tar.gz
|
|
key: darwin-sysroot-${{ runner.os }}-${{ hashFiles('.github/workflows/populate_darwin_sysroot.sh') }}
|
|
- name: Populate Darwin sysroot
|
|
if: steps.cache-sysroot.outputs.cache-hit != 'true'
|
|
run: bash .github/workflows/populate_darwin_sysroot.sh
|
|
- name: Create Darwin sysroot tarball
|
|
if: steps.cache-sysroot.outputs.cache-hit != 'true'
|
|
run: tar -czvf .sysroot/darwin.tar.gz -C .sysroot darwin
|
|
- name: Upload Darwin sysroot tarball
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: darwin-sysroot-tarball
|
|
path: .sysroot/darwin.tar.gz
|
|
compression-level: 0
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
needs: populate-darwin-sysroot
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 1.23.x
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
- name: Download Darwin sysroot tarball
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: darwin-sysroot-tarball
|
|
path: .sysroot
|
|
- name: Populate Darwin sysroot
|
|
run: tar -xzvf .sysroot/darwin.tar.gz -C .sysroot
|
|
- name: Populate Linux sysroot
|
|
run: bash .github/workflows/populate_linux_sysroot.sh
|
|
- name: Run GoReleaser
|
|
env:
|
|
GITHUB_TOKEN: ${{github.token}}
|
|
run: |
|
|
docker run \
|
|
--rm \
|
|
-e GITHUB_TOKEN=${GITHUB_TOKEN} \
|
|
-v /var/run/docker.sock:/var/run/docker.sock \
|
|
-v $(pwd):/go/src/llgo \
|
|
-w /go/src/llgo \
|
|
ghcr.io/goreleaser/goreleaser-cross:v1.22 \
|
|
release --clean --skip nfpm,snapcraft
|