Skip to content

First Official Version #6

First Official Version

First Official Version #6

Workflow file for this run

name: Release Go Binaries
on:
release:
types: [created]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
permissions:
contents: read
jobs:
release:
permissions:
contents: write
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows, darwin]
goarch: [amd64, arm64]
exclude:
- goarch: arm64
goos: windows
steps:
- name: Check out
uses: actions/checkout@v4
- name: Add SHORT_SHA env
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
- name: Go Release Binaries
uses: wangyoucao577/go-release-action@v1.48
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
pre_command: export CGO_ENABLED=0
ldflags: -extldflags -static -X github.com/getnoops/ops/pkg/version.COMMIT=${{github.sha}} -X github.com/getnoops/ops/pkg/version.VERSION_NUMBER=${{github.ref_name}}
binary_name: ops
asset_name: "ops-${{ env.SHORT_SHA }}-${{ matrix.goos }}-${{ matrix.goarch }}"