Add Action to build binaries on update
This commit is contained in:
parent
6c6eec915c
commit
1ee00f57d0
1 changed files with 46 additions and 0 deletions
46
.gitea/workflows/build.yaml
Normal file
46
.gitea/workflows/build.yaml
Normal file
|
@ -0,0 +1,46 @@
|
|||
name: Build binaries
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '.gitea/workflows/build.yaml'
|
||||
- '*.go'
|
||||
|
||||
jobs:
|
||||
Explore-Gitea-Actions:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: 'stable'
|
||||
- name: Go Build Linux x64
|
||||
run: |
|
||||
GOOS=linux GOARCH=amd64 \
|
||||
go build \
|
||||
-ldflags="-s -w" \
|
||||
-o linux-amd64
|
||||
- name: Go Build Linux arm64
|
||||
run: |
|
||||
GOOS=linux GOARCH=arm64 \
|
||||
go build \
|
||||
-ldflags="-s -w" \
|
||||
-o linux-arm64
|
||||
- name: Go Build Windows x64
|
||||
run: |
|
||||
GOOS=windows GOARCH=amd64 \
|
||||
go build \
|
||||
-ldflags="-s -w" \
|
||||
-o windows-amd64
|
||||
- name: Go Build Windows arm64
|
||||
run: |
|
||||
GOOS=windows GOARCH=arm64 \
|
||||
go build \
|
||||
-ldflags="-s -w" \
|
||||
-o windows-arm64
|
||||
- uses: EndBug/add-and-commit@v9
|
||||
with:
|
||||
default_author: github_actions
|
||||
message: Recompiled binaries
|
Reference in a new issue