Skip to content

release

release #2

Workflow file for this run

name: release
on:
push:
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, darwin, windows]
goarch: [amd64]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: "1.22"
- name: Build
run: |
mkdir -p dist
EXT=""
if [ "${{ matrix.goos }}" = "windows" ]; then EXT=".exe"; fi
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o dist/github-fork-manager-${{ matrix.goos }}-${{ matrix.goarch }}${EXT} ./cmd/github-fork-manager
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: binaries-${{ matrix.goos }}-${{ matrix.goarch }}
path: dist/*
retention-days: 7
release:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/download-artifact@v4
with:
pattern: binaries-*
path: dist
merge-multiple: true
- name: Create checksums
run: |
(cd dist && shasum -a 256 * > checksums.txt)
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: |
dist/github-fork-manager-*
dist/checksums.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}