Skip to content

Inital work (#1)

Inital work (#1) #13

Workflow file for this run

name: Release
on:
push:
tags:
- "**"
permissions:
contents: write
jobs:
preflight:
runs-on: ubuntu-latest
outputs:
go_version: ${{ steps.get_go_version.outputs.go_version }}
steps:
- uses: actions/checkout@v3
- id: get_go_version
name: Get Golang version
run: |
set -euo pipefail
go_version=$(sed -n 3p ${GITHUB_WORKSPACE}/go.mod | cut -d " " -f2)
echo "Golang version: ${go_version}"
echo "go_version=$go_version" >> "$GITHUB_OUTPUT"
release:
needs: preflight
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: git fetch --force --tags
- uses: actions/setup-go@v4
with:
go-version: ${{ needs.preflight.outputs.go_version }}
- uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}