0.1.0 #23
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: |- | |
GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build -v -o tfvars | |
mv tfvars tfvars-${{ 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 }} ./tfvars-${{ matrix.os }}-${{ matrix.arch }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |