Improve go.yml workflow.
This commit is contained in:
parent
e508e8d967
commit
b26b9785d4
1 changed files with 14 additions and 10 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue