Add go package build workflow.
All checks were successful
Build Docker image / build (push) Successful in 58s
All checks were successful
Build Docker image / build (push) Successful in 58s
This commit is contained in:
parent
bfffaa233d
commit
e508e8d967
1 changed files with 38 additions and 0 deletions
38
.gitea/workflows/go.yml
Normal file
38
.gitea/workflows/go.yml
Normal file
|
@ -0,0 +1,38 @@
|
|||
name: release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: setup go
|
||||
uses: https://github.com/actions/setup-go@v4
|
||||
with:
|
||||
go-version: '>=1.x'
|
||||
- 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
|
||||
- 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
|
||||
- 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
|
||||
- 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
|
||||
- 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
|
||||
- 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
|
||||
|
||||
- name: Use Go Action
|
||||
id: use-go-action
|
||||
uses: actions/release-action@main
|
||||
with:
|
||||
files: |-
|
||||
bin/**
|
||||
api_key: '${{secrets.RELEASE_TOKEN}}'
|
Loading…
Reference in a new issue