Skip to content

🎨 gofmt

🎨 gofmt #18

Workflow file for this run

name: Build
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Build for linux/amd64
run: GOOS=linux GOARCH=amd64 GIN_MODE=release go build -v -ldflags="-s -w" -o opt/munager_linux_amd64 .
- name: Build for windows/amd64
run: GOOS=windows GOARCH=amd64 GIN_MODE=release go build -v -ldflags="-s -w" -o opt/munager_windows_amd64.exe .
- name: Build for android/arm64
run: GOOS=android GOARCH=arm64 GIN_MODE=release go build -v -ldflags="-s -w" -o opt/munager_android_arm64 .
- name: Upload compiled artifact
uses: actions/upload-artifact@v3
with:
name: munager_executables
path: opt/
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
opt/munager_linux_amd64
opt/munager_windows_amd64.exe
opt/munager_android_arm64