Skip to content

Commit

Permalink
ci/release: Use latest Go, support manual run
Browse files Browse the repository at this point in the history
Use the latest Go (this is needed now),
and support manually invoking the release workflow
for failed partial releases.
  • Loading branch information
abhinav committed Nov 8, 2023
1 parent eb13f39 commit 0c8b574
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ on:
push:
tags: ['v*']

workflow_dispatch:
inputs:
version:
description: "Version to release, including the 'v' prefix."
required: true
type: string

permissions:
contents: write

Expand All @@ -13,11 +20,13 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.version || github.ref }}

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.20.x
go-version: 1.21.x
cache: true

- name: Install parse-changelog
Expand All @@ -30,12 +39,18 @@ jobs:
with:
fetch-depth: 0

- name: Determine version
- name: Determine version (tagged release)
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
run: |
set -eou pipefail
REF=${{ github.ref }}
echo "VERSION=${REF#refs/tags/v}" >> "$GITHUB_ENV"
- name: Determine version (manual dispatch)
if: github.event_name == 'workflow_dispatch'
run: |
echo "VERSION=${INPUT_VERSION#v}" >> "$GITHUB_ENV"
env:
INPUT_VERSION: ${{ inputs.version }}

- name: Extract changelog
run: |
Expand Down

0 comments on commit 0c8b574

Please sign in to comment.