0.5.1 #30
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
permissions: | |
contents: write | |
jobs: | |
create-release: | |
runs-on: ubuntu-latest | |
outputs: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: >- | |
gh release create ${{ github.ref_name }} \ | |
--draft \ | |
--verify-tag \ | |
--title ${{ github.ref_name }} \ | |
upload-assets: | |
needs: create-release | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
os: [ linux, windows, darwin ] | |
arch: [ amd64, arm64 ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.21' | |
id: go | |
- name: Build | |
env: | |
GO111MODULE: on | |
run: |- | |
cp VERSION ./cmd/svart/ | |
GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build -v -o svart ./cmd/svart | |
mv svart svart-${{ matrix.os }}-${{ matrix.arch }} | |
- name: Upload release asset | |
run: |- | |
set -euxo pipefail | |
gh repo view | |
gh release view ${{ github.ref_name }} | |
gh release upload ${{ github.ref_name }} ./svart-${{ matrix.os }}-${{ matrix.arch }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |