3 Commits

Author SHA1 Message Date
Adrian Zürcher
988a332249 cache golang 2025-08-05 14:15:21 +02:00
29d91d1133 .gitea/workflows/build.yaml aktualisiert
Some checks failed
Build Process Supervisor / build (amd64, , linux) (push) Successful in 10m13s
Build Process Supervisor / build (arm, 6, , linux) (push) Has been cancelled
Build Process Supervisor / build (arm64, , linux) (push) Has been cancelled
Build Process Supervisor / build (amd64, .exe, windows) (push) Has been cancelled
2025-08-05 13:54:42 +02:00
f40c54ebc1 set go version and fix goarm 2025-08-05 13:53:47 +02:00

View File

@@ -33,22 +33,34 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Go
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 'stable'
go-version: '1.24.5'
- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Download Go dependencies
run: go mod download
- name: Build binaries
run: |
OUTPUT="bin/${{ env.APP_NAME }}-${{ matrix.os }}-${{ matrix.arch }}"
if [ "${{ matrix.arm_version }}" != "" ]; then
OUTPUT="bin/${APP_NAME}-${{ matrix.os }}-${{ matrix.arch }}"
if [ -n "${{ matrix.arm_version }}" ]; then
OUTPUT="${OUTPUT}v${{ matrix.arm_version }}"
export GOARM=${{ matrix.arm_version }}
fi
OUTPUT="${OUTPUT}${{ matrix.ext }}"
echo "Building $OUTPUT"
GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} \
{{ matrix.arm_version && format('GOARM={0}', matrix.arm_version) || '' }} \
go build -ldflags="-s -w" -trimpath -o "$OUTPUT"
GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build -ldflags="-s -w" -trimpath -o "$OUTPUT"
shell: bash
- name: Upload artifacts