Improve go.yml workflow.
Some checks failed
Build Golang packages / release (push) Waiting to run
Build Docker image / build (push) Has been cancelled

This commit is contained in:
Pieter Hollander 2024-02-21 19:05:56 +01:00
parent e508e8d967
commit b26b9785d4
Signed by: pieter
SSH key fingerprint: SHA256:HbX+9cBXsop9SuvL+mELd29sK+7DehFfdVweFVDtMSg

View file

@ -1,9 +1,13 @@
name: release name: Build Golang packages
on: on:
push: push:
branches:
- "**"
tags: tags:
- '*' - "v*.*.*"
pull_request:
branches:
- "main"
jobs: jobs:
release: release:
@ -17,17 +21,17 @@ jobs:
with: with:
go-version: '>=1.x' go-version: '>=1.x'
- name: release-build-linux-amd64 - name: release-build-linux-amd64
run: GOOS=linux GOARCH=amd64 go build -ldflags="-s -w -X 'main.Version=${{ github.ref_name }}'" -o bin/reverse-${{ github.ref_name }}-linux-amd64 run: GOOS=linux GOARCH=amd64 go build -ldflags="-s -w -X 'main.Version=${{ github.ref_name }}'" -o bin/opendtu-logger-${{ github.ref_name }}-linux-amd64
- name: release-build-linux-arm64 - name: release-build-linux-arm64
run: GOOS=linux GOARCH=arm64 go build -ldflags="-s -w -X 'main.Version=${{ github.ref_name }}'" -o bin/reverse-${{ github.ref_name }}-linux-arm64 run: GOOS=linux GOARCH=arm64 go build -ldflags="-s -w -X 'main.Version=${{ github.ref_name }}'" -o bin/opendtu-logger-${{ github.ref_name }}-linux-arm64
- name: release-build-windows-amd64 - name: release-build-windows-amd64
run: GOOS=windows GOARCH=amd64 go build -ldflags="-s -w -X 'main.Version=${{ github.ref_name }}'" -o bin/reverse-${{ github.ref_name }}-windows-amd64.exe run: GOOS=windows GOARCH=amd64 go build -ldflags="-s -w -X 'main.Version=${{ github.ref_name }}'" -o bin/opendtu-logger-${{ github.ref_name }}-windows-amd64.exe
- name: release-build-windows-arm64 - name: release-build-windows-arm64
run: GOOS=windows GOARCH=arm64 go build -ldflags="-s -w -X 'main.Version=${{ github.ref_name }}'" -o bin/reverse-${{ github.ref_name }}-windows-arm64.exe run: GOOS=windows GOARCH=arm64 go build -ldflags="-s -w -X 'main.Version=${{ github.ref_name }}'" -o bin/opendtu-logger-${{ github.ref_name }}-windows-arm64.exe
- name: release-build-darwin-amd64 - name: release-build-darwin-amd64
run: GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w -X 'main.Version=${{ github.ref_name }}'" -o bin/reverse-${{ github.ref_name }}-darwin-amd64 run: GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w -X 'main.Version=${{ github.ref_name }}'" -o bin/opendtu-logger-${{ github.ref_name }}-darwin-amd64
- name: release-build-darwin-arm64 - name: release-build-darwin-arm64
run: GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w -X 'main.Version=${{ github.ref_name }}'" -o bin/reverse-${{ github.ref_name }}-darwin-arm64 run: GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w -X 'main.Version=${{ github.ref_name }}'" -o bin/opendtu-logger-${{ github.ref_name }}-darwin-arm64
- name: Use Go Action - name: Use Go Action
id: use-go-action id: use-go-action