Merge pull request #978 from visualfc/llruntime #11
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |