42 lines
1014 B
YAML
42 lines
1014 B
YAML
name: build
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- '*'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Setup go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: '>=1.20'
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0 # all history for all branches and tags
|
|
|
|
- name: Linux build amd64
|
|
run: GOOS=linux GOARCH=amd64 go build -o bin/geolist-linux-amd64
|
|
|
|
- name: Linux build arm64
|
|
run: GOOS=linux GOARCH=arm64 go build -o bin/geolist-linux-arm64
|
|
|
|
- name: Darwin build amd64
|
|
run: GOOS=darwin GOARCH=amd64 go build -o bin/geolist-darwin-amd64
|
|
|
|
- name: Darwin build arm64
|
|
run: GOOS=darwin GOARCH=arm64 go build -o bin/geolist-darwin-arm64
|
|
|
|
- name: Create release
|
|
uses: https://gitea.com/actions/release-action@main
|
|
with:
|
|
draft: false
|
|
prerelease: false
|
|
files: |-
|
|
bin/**
|
|
api_key: "${{ secrets.RELEASE_TOKEN }}"
|