Skip to content

Track Go entrypoint in git #5

Track Go entrypoint in git

Track Go entrypoint in git #5

Workflow file for this run

name: release
on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
tag_name:
description: "Release tag to publish, like v1.0.2"
required: true
type: string
permissions:
contents: write
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-latest
goos: linux
goarch: amd64
- os: ubuntu-latest
goos: linux
goarch: arm64
- os: macos-latest
goos: darwin
goarch: amd64
- os: macos-latest
goos: darwin
goarch: arm64
- os: windows-latest
goos: windows
goarch: amd64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.23"
- name: Build
shell: bash
run: |
set -euo pipefail
cd "${GITHUB_WORKSPACE}"
mkdir -p dist
ext=""
if [ "${{ matrix.goos }}" = "windows" ]; then
ext=".exe"
fi
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o "dist/git-ark-${{ matrix.goos }}-${{ matrix.goarch }}${ext}" ./cmd/git-ark
- uses: actions/upload-artifact@v4
with:
name: git-ark-${{ matrix.goos }}-${{ matrix.goarch }}
path: dist/*
publish:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- name: Create checksums
shell: bash
run: |
set -euo pipefail
cd dist
sha256sum git-ark-* > SHA256SUMS.txt
- name: Publish release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event_name == 'workflow_dispatch' && inputs.tag_name || github.ref_name }}
files: |
dist/git-ark-*
dist/SHA256SUMS.txt
generate_release_notes: true