Skip to content

Release binary to the GitHub Release #60

Release binary to the GitHub Release

Release binary to the GitHub Release #60

Workflow file for this run

name: Release binary to the GitHub Release
on:
workflow_dispatch:
inputs:
method:
description: |
Which number to increment in the semantic versioning.
required: true
type: choice
options:
- major
- minor
- patch
jobs:
release-binary:
name: Release Binary
runs-on: ubuntu-latest
steps:
- name: Check Actor
if: github.actor != 'kyoh86'
run: exit 1
- name: Check Branch
if: github.ref != 'refs/heads/main'
run: exit 1
- name: Wait commit status
uses: cloudposse/github-action-wait-commit-status@main
with:
repository: ${{ github.repository }}
sha: ${{ github.sha }}
status: releasable
token: ${{ github.token }}
check-timeout: 120
check-retry-count: 5
check-retry-interval: 20
- name: Checkout Sources
uses: actions/checkout@v4
- name: Bump-up Semantic Version
uses: kyoh86/git-vertag-action@v1
with:
# method: "major", "minor" or "patch" to update tag with semver
method: "${{ github.event.inputs.method }}"
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.21
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
with:
version: latest
args: release --clean