mirror of
https://github.com/apernet/OpenGFW.git
synced 2024-11-13 13:59:24 +08:00
42 lines
818 B
YAML
42 lines
818 B
YAML
name: Release
|
|
on:
|
|
release:
|
|
types: [published]
|
|
|
|
permissions:
|
|
contents: write
|
|
packages: write
|
|
|
|
jobs:
|
|
releases-matrix:
|
|
name: Release Go Binary
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
goos: [linux]
|
|
goarch: ["386", amd64, arm64]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: "1.22"
|
|
|
|
- name: Install pcap
|
|
run: sudo apt install -y libpcap-dev
|
|
|
|
- name: Build
|
|
env:
|
|
GOOS: ${{ matrix.goos }}
|
|
GOARCH: ${{ matrix.goarch }}
|
|
run: |
|
|
mkdir -p build
|
|
go build -o build/OpenGFW-${GOOS}-${GOARCH} -ldflags "-s -w" .
|
|
|
|
- name: Upload
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
files: build/*
|