This action builds golang executables and stores them as artifacts.
Example usage
name: Release Golang executable on tag
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
release-prerequisites:
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
RELEASE_BODY: ${{ steps.release-prerequisites.outputs.RELEASE_BODY }}
steps:
- id: release-prerequisites
uses: thetillhoff/[email protected]
golang-build:
needs: release-prerequisites
runs-on: ubuntu-latest
permissions:
contents: write
strategy:
matrix:
os:
- linux
- windows
- darwin
arch:
- amd64
steps:
- uses: thetillhoff/[email protected]
with:
OS: "${{ matrix.os }}"
ARCH: "${{ matrix.arch }}"
BUILDARGS: -ldflags="-X 'github.com/thetillhoff/webscan/cmd.version=${{ github.ref_name }}'"
release-artifacts:
needs:
- golang-build
- release-prerequisites
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: thetillhoff/[email protected]
with:
RELEASE_BODY: "${{needs.release-prerequisites.outputs.RELEASE_BODY}}"