Skip to content

Commit

Permalink
Add Github Action to automatically build binary files
Browse files Browse the repository at this point in the history
  • Loading branch information
Dishone committed Feb 18, 2023
1 parent d1f79ec commit d179eb5
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build Release

on:
release:
types: [created]

permissions:
contents: read

jobs:
build-go-binary:
permissions:
contents: write # for build-go-binary
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows]
goarch: [amd64, arm64]
exclude:
- goarch: arm64
goos: windows
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Create version file
run: echo ${{ github.event.release.tag_name }} > VERSION
- name: Parallel build
uses: wangyoucao577/go-release-action@v1.30
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: 1.18
pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0
executable_compression: "upx -9"
md5sum: false
project_path: "./code"
binary_name: "start-feishubot"
extra_files: ./code/config.example.yaml

0 comments on commit d179eb5

Please sign in to comment.