chore(ci): add workflow_dispatch for manual release tagging
This commit is contained in:
@@ -4,6 +4,11 @@ on:
|
|||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v*'
|
- 'v*'
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
tag:
|
||||||
|
description: 'Tag to release (e.g. v1.2.3)'
|
||||||
|
required: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
@@ -35,7 +40,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Build release binaries
|
- name: Build release binaries
|
||||||
run: |
|
run: |
|
||||||
VERSION="${GITHUB_REF_NAME}"
|
VERSION="${{ github.event.inputs.tag || github.ref_name }}"
|
||||||
for target in "linux/amd64" "linux/arm64" "darwin/amd64" "darwin/arm64" "windows/amd64"; do
|
for target in "linux/amd64" "linux/arm64" "darwin/amd64" "darwin/arm64" "windows/amd64"; do
|
||||||
GOOS="${target%/*}"
|
GOOS="${target%/*}"
|
||||||
GOARCH="${target#*/}"
|
GOARCH="${target#*/}"
|
||||||
@@ -50,7 +55,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Create release and upload assets
|
- name: Create release and upload assets
|
||||||
run: |
|
run: |
|
||||||
TAG="${GITHUB_REF_NAME}"
|
TAG="${{ github.event.inputs.tag || github.ref_name }}"
|
||||||
API="${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/releases"
|
API="${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/releases"
|
||||||
|
|
||||||
RELEASE=$(curl -s -X POST "$API" \
|
RELEASE=$(curl -s -X POST "$API" \
|
||||||
|
|||||||
Reference in New Issue
Block a user