Skip to content

More interations

More interations #1

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
release:
name: Build and release
runs-on: ubuntu-latest
strategy:
matrix:
include:
- goos: linux
goarch: amd64
- goos: linux
goarch: arm64
- goos: darwin
goarch: amd64
- goos: darwin
goarch: arm64
- goos: windows
goarch: amd64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: "0"
run: |
EXT=""
[ "$GOOS" = "windows" ] && EXT=".exe"
go build -trimpath -ldflags="-s -w -X main.version=${{ github.ref_name }}" \
-o "tulip-${{ matrix.goos }}-${{ matrix.goarch }}${EXT}" .
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: tulip-${{ matrix.goos }}-${{ matrix.goarch }}
path: tulip-${{ matrix.goos }}-${{ matrix.goarch }}*
publish:
name: Publish release
needs: release
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- name: Create checksums
run: |
cd dist
sha256sum tulip-* > checksums.txt
- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
files: |
dist/tulip-*
dist/checksums.txt
generate_release_notes: true