Some checks failed
Release / build (amd64, darwin) (push) Successful in 15s
Release / build (arm64, darwin) (push) Successful in 5s
CI / build-and-test (push) Failing after 3s
Release / build (arm64, linux) (push) Successful in 15s
Release / release (push) Successful in 11s
Release / build (amd64, linux) (push) Successful in 9s
Release / build (amd64, windows) (push) Successful in 5s
The actions/setup-go@v5 cache feature tries to upload to GitHub's cache infrastructure, which doesn't exist on self-hosted Gitea runners. This causes jobs to hang indefinitely during the post step. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
77 lines
1.9 KiB
YAML
77 lines
1.9 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- goos: linux
|
|
goarch: amd64
|
|
- goos: linux
|
|
goarch: arm64
|
|
- goos: darwin
|
|
goarch: amd64
|
|
- goos: darwin
|
|
goarch: arm64
|
|
- goos: windows
|
|
goarch: amd64
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: 'go.mod'
|
|
cache: false
|
|
|
|
- name: Build
|
|
run: |
|
|
VERSION=${GITHUB_REF_NAME#v}
|
|
EXT=""
|
|
if [ "${{ matrix.goos }}" = "windows" ]; then
|
|
EXT=".exe"
|
|
fi
|
|
CGO_ENABLED=0 GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} \
|
|
go build -ldflags "-X gitea.com/gitea/act_runner/internal/pkg/ver.version=${VERSION}" \
|
|
-o act_runner-${{ matrix.goos }}-${{ matrix.goarch }}${EXT}
|
|
env:
|
|
GOPRIVATE: git.marketally.com
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: act_runner-${{ matrix.goos }}-${{ matrix.goarch }}
|
|
path: act_runner-*
|
|
|
|
release:
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Download all artifacts
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
path: artifacts
|
|
|
|
- name: Prepare release files
|
|
run: |
|
|
mkdir -p release
|
|
find artifacts -type f -name 'act_runner-*' -exec mv {} release/ \;
|
|
cd release && sha256sum * > checksums.txt
|
|
|
|
- name: Create Release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: release/*
|
|
generate_release_notes: true
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|