This commit is contained in:
yeongpin 2025-02-08 22:00:19 +08:00
parent b61b61c607
commit ffcb8ec140

View File

@ -1,6 +1,12 @@
name: Build Release
on:
workflow_dispatch:
inputs:
version:
description: 'Version number (without v prefix)'
required: true
default: '1.0.0'
push:
tags:
- 'v*'
@ -31,10 +37,15 @@ jobs:
with:
python-version: '3.10'
- name: Get version from tag
- name: Get version
id: get_version
shell: bash
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
else
echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
fi
- name: Make scripts executable (Unix)
if: runner.os != 'Windows'