Skip to content

Workflow file for this run

on:
release:
types: [created]
permissions:
contents: write
packages: write
jobs:
releases-matrix:
name: Release Go Binary
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows, darwin]
goarch: [amd64, arm64]
exclude:
- goarch: arm64
goos: windows
steps:
- name: Get Release Info
run: |
{
echo "RELEASE_TAG=${GITHUB_REF/refs\/tags\//}"
echo "REPOSITORY_NAME=${GITHUB_REPOSITORY#*/}"
echo "ARCH_NAME=${{ matrix.goarch }}"
echo "OS_NAME=${{ matrix.goos }}"
} >> "$GITHUB_ENV"
- name: OS darwin
if: matrix.goos == 'darwin'
run: echo "OS_NAME=osx" >> "$GITHUB_ENV"
- name: Arch amd64
if: matrix.goarch == 'amd64'
run: echo "ARCH_NAME=x86_64" >> "$GITHUB_ENV"
- uses: actions/checkout@v3
- uses: wangyoucao577/go-release-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
md5sum: false
build_command: make
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: 1.23.4
extra_files: LICENSE README.md env.example
asset_name: "${{ env.REPOSITORY_NAME }}_${{ env.RELEASE_TAG }}_${{ env.OS_NAME }}_${{ env.ARCH_NAME }}"