Skip to content

Commit

Permalink
feat: Add turncat binaries as release assets (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
levaitamas authored Jan 19, 2024
1 parent e1d3b8c commit 1b20538
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,57 @@ jobs:
repo: stunner-helm
client_payload: '{"tag": "${{ steps.vars.outputs.tag }}", "type": "stunner"}'
workflow_file_name: publish.yaml

add_turncat_binaries:
name: Add turncat binaries to release assets
needs: run_tests
runs-on: ubuntu-latest
strategy:
matrix:
include:
- os: linux
arch: amd64
file_end: ""
- os: linux
arch: arm64
file_end: ""

- os: darwin
arch: amd64
file_end: ""
- os: darwin
arch: arm64
file_end: ""

- os: windows
arch: amd64
file_end: ".exe"
- os: windows
arch: arm64
file_end: ".exe"

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Get version
id: vars
run: echo tag=$(echo ${GITHUB_REF:11}) >> $GITHUB_OUTPUT

- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.21'

- name: Build turncat binary
run: |
CGO_ENABLED=0 GOARCH=${{ matrix.arch }} GOOS=${{ matrix.os }} go build -ldflags="-w -s" -trimpath -o turncat cmd/turncat/main.go
mv turncat turncat-v${{ steps.vars.outputs.tag }}-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.file_end }}
- name: Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: turncat-v${{ steps.vars.outputs.tag }}-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.file_end }}
tag: ${{ github.ref_name }}
asset_name: turncat-v${{ steps.vars.outputs.tag }}-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.file_end }}

0 comments on commit 1b20538

Please sign in to comment.