mirror of
https://github.com/CyberL1/holesail-proxy.git
synced 2025-02-23 02:29:21 -05:00
46 lines
1.2 KiB
YAML
46 lines
1.2 KiB
YAML
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: Set env
|
|
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
|
- name: Build binary
|
|
run: |
|
|
export GOOS=${{ matrix.os }}
|
|
export GOARCH=${{ matrix.arch }}
|
|
go build -ldflags "-X holesail-proxy/utils.Version=${{ env.RELEASE_VERSION }}"
|
|
- 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: ${{ env.RELEASE_VERSION }}
|
|
artifacts: holesail-proxy-${{ matrix.os }}-${{ matrix.arch }}.zip
|
|
allowUpdates: true
|