Skip to content

Release

Release #7

Workflow file for this run

name: "Release"
on: workflow_dispatch
permissions:
contents: write
packages: write
jobs:
release:
name: "Release"
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- id: setup-go
uses: ./.github/actions/setup-go
- name: Go build all production binaries
run: |
git fetch --force --tags
make build-all-prod
- name: Create a GitHub Release
run: |
git fetch --tags
previous_release_tag=$(gh release list --json tagName -L 1 --jq '.[0].tagName')
latest_tag="$(git describe --tags --abbrev=0)"
gh release create \
"${latest_tag}" \
--title "Release ${latest_tag}" \
--latest \
--generate-notes \
--notes-start-tag "${previous_release_tag}" \
bin/anchor_linux_amd64 \
bin/anchor_linux_arm64 \
bin/anchor_darwin_amd64 \
bin/anchor_darwin_arm64 \
bin/anchor_windows_amd64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}