44 lines
1.1 KiB
YAML
Raw Normal View History

2025-02-16 08:38:46 +01:00
name: Release
permissions: write-all
on:
push:
tags:
- "v*"
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
os:
- windows
- linux
- darwin
arch:
- amd64
- arm64
exclude:
- os: windows
arch: arm64
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.23'
- name: Build binary
run: |
export GOOS=${{ matrix.os }}
export GOARCH=${{ matrix.arch }}
2025-02-16 09:53:54 +01:00
go build -ldflags "-X holesail-proxy/utils.Version=1"
2025-02-16 08:49:04 +01:00
- name: Pack binary
run: zip holesail-proxy-${{ matrix.os }}-${{ matrix.arch }}.zip holesail-proxy${{ matrix.os == 'windows' && '.exe' || '' }}
- name: Create release
uses: ncipollo/release-action@v1.15.0
with:
tag: ${{ needs.create-tag.outputs.new_tag }}
artifacts: holesail-proxy-${{ matrix.os }}-${{ matrix.arch }}.zip
allowUpdates: true