Skip to content

Merge pull request #121 from AppSprout-dev/release-please--branches--… #5

Merge pull request #121 from AppSprout-dev/release-please--branches--…

Merge pull request #121 from AppSprout-dev/release-please--branches--… #5

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
build:
strategy:
matrix:
include:
- os: macos-14
goos: darwin
goarch: arm64
name: darwin_arm64
- os: macos-15
goos: darwin
goarch: amd64
name: darwin_amd64
- os: ubuntu-latest
goos: linux
goarch: amd64
name: linux_amd64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.23"
- name: Build
env:
CGO_ENABLED: "1"
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: |
VERSION=${GITHUB_REF_NAME#v}
go build -tags sqlite_fts5 -ldflags "-s -w -X main.Version=${VERSION}" -o mnemonic ./cmd/mnemonic
- name: Package
run: |
VERSION=${GITHUB_REF_NAME#v}
ARCHIVE="mnemonic_${VERSION}_${{ matrix.name }}.tar.gz"
tar czf "${ARCHIVE}" mnemonic README.md LICENSE config.yaml docs/
echo "ARCHIVE=${ARCHIVE}" >> $GITHUB_ENV
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: binary-${{ matrix.name }}
path: ${{ env.ARCHIVE }}
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: dist/
merge-multiple: true
- name: Generate checksums
working-directory: dist
run: sha256sum *.tar.gz > checksums.txt
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
dist/*.tar.gz
dist/checksums.txt
generate_release_notes: true
draft: false