Merge pull request #9 from jandubois/bump-lima-1.0.0 #34
Workflow file for this run
This file contains 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 | |
on: | |
push: | |
tags: | |
- 'v*.rd*' | |
- 'test-v*.rd*' | |
pull_request: | |
workflow_dispatch: | |
env: | |
GO111MODULE: on | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: | |
- macos-12 | |
- macos-13 | |
- ubuntu-20.04 | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: 1.23.x | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
submodules: recursive | |
- name: Install sha512sum | |
if: startswith(matrix.os, 'macos') | |
run: brew install coreutils | |
- name: Build lima tarballs | |
env: | |
OS: ${{ matrix.os }} | |
run: | | |
set -x | |
command -v xcrun && xcrun --show-sdk-version | |
cd lima | |
export GOARCH | |
for GOARCH in amd64 arm64; do | |
if [ "$GOARCH" == "amd64" -o "$(uname)" == "Darwin" ]; then | |
ARCH=${GOARCH/amd64/x86_64} | |
ARCH=${ARCH/arm64/aarch64} | |
GUESTAGENT="_output/share/lima/lima-guestagent.Linux-${ARCH}" | |
make clean exe "$GUESTAGENT" | |
find _output -type f -exec file {} \; | |
TARBALL="lima.${OS/ubuntu-*/linux}.${GOARCH}.tar.gz" | |
tar cfvz "$TARBALL" -C _output ./ | |
sha512sum "$TARBALL" >"${TARBALL}.sha512sum" | |
fi | |
done | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: lima.${{ matrix.os }} | |
path: lima/lima.* | |
if-no-files-found: error | |
release: | |
if: github.event_name != 'pull_request' | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
needs: [build] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
- name: "Create release" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
TAG="${GITHUB_REF##*/}" | |
gh release create "$TAG" --draft --notes "$TAG" lima.*/* |