This repository has been archived by the owner on Oct 30, 2024. It is now read-only.
fix: checksum #97
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- "v*" | |
env: | |
GO_VERSION: "1.22.x" | |
jobs: | |
release-github: | |
name: Build & Release Binaries | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-22.04, macos-latest ] | |
steps: | |
# Setup | |
- uses: actions/checkout@v4 | |
- name: Setup Go environment | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "${{ env.GO_VERSION }}" | |
- name: Setup CI Tools | |
run: make ci-setup | |
- name: Run Go Tests | |
run: make test | |
- name: Install Homebrew on macOS | |
if: runner.os == 'macOS' | |
run: | | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile | |
eval "$(/opt/homebrew/bin/brew shellenv)" | |
brew install mingw-w64 | |
# Go Build | |
- name: Build Binary | |
run: make build-cross | |
# Create Git Release | |
- name: Extract Tag from Ref | |
if: startsWith(github.ref, 'refs/tags/') | |
id: tag | |
run: echo VERSION=${GITHUB_REF/refs\/tags\//} >> $GITHUB_OUTPUT | |
shell: bash | |
- uses: apexskier/github-semver-parse@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
id: semver | |
with: | |
version: ${{ steps.tag.outputs.VERSION }} | |
- name: Create Release | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
artifactErrorsFailBuild: true | |
artifacts: dist/* | |
makeLatest: ${{ steps.semver.outputs.prerelease == '' }} | |
generateReleaseNotes: true | |
prerelease: ${{ steps.semver.outputs.prerelease != '' }} | |
replacesArtifacts: true | |
token: ${{ secrets.GITHUB_TOKEN }} |