Refactor release workflows and add release-all trigger

Refactored build workflows for Linux, macOS, and Windows to use workflow_dispatch and workflow_call with explicit version input, replacing tag-based triggers. Updated release steps to use the provided version input for tagging and naming. Added a new release-all workflow to trigger all platform builds with a single version input.
This commit is contained in:
oop7
2026-01-06 15:52:58 +02:00
parent 4aa0a7b70e
commit 16e61c5d6f
4 changed files with 79 additions and 33 deletions
+17 -11
View File
@@ -1,9 +1,18 @@
name: Build Linux Release name: Build Linux Release
on: on:
push: workflow_dispatch:
tags: inputs:
- 'v*' version:
description: 'Version name for the release (e.g., 1.0.0)'
required: true
type: string
workflow_call:
inputs:
version:
description: 'Version name for the release (e.g., 1.0.0)'
required: true
type: string
permissions: permissions:
contents: write contents: write
@@ -21,12 +30,11 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Extract version from tag - name: Get version
id: get_version id: get_version
shell: bash shell: bash
run: | run: |
tag="${GITHUB_REF_NAME}" version="${{ inputs.version || github.event.inputs.version }}"
version="${tag#v}"
echo "Extracted version: $version" echo "Extracted version: $version"
echo "VERSION=$version" >> "$GITHUB_OUTPUT" echo "VERSION=$version" >> "$GITHUB_OUTPUT"
@@ -405,18 +413,16 @@ jobs:
- name: Create/Update draft release - name: Create/Update draft release
uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@v2
with: with:
tag_name: ${{ github.ref_name }} tag_name: v${{ steps.get_version.outputs.VERSION }}
name: YTSage ${{ github.ref_name }} name: YTSage v${{ steps.get_version.outputs.VERSION }}
draft: true draft: true
prerelease: false prerelease: false
append_body: true append_body: true
fail_on_unmatched_files: false fail_on_unmatched_files: false
body: | body: |
# YTSage ${{ github.ref_name }} # YTSage v${{ steps.get_version.outputs.VERSION }}
**Release Date**: ${{ github.event.head_commit.timestamp }} **Release Date**: ${{ github.event.head_commit.timestamp }}
**Full Changelog**: https://github.com/${{ github.repository }}/compare/${{ github.ref_name }}
files: | files: |
artifacts/* artifacts/*
env: env:
+17 -11
View File
@@ -1,9 +1,18 @@
name: Build macOS Release name: Build macOS Release
on: on:
push: workflow_dispatch:
tags: inputs:
- 'v*' version:
description: 'Version name for the release (e.g., 1.0.0)'
required: true
type: string
workflow_call:
inputs:
version:
description: 'Version name for the release (e.g., 1.0.0)'
required: true
type: string
permissions: permissions:
contents: write contents: write
@@ -21,12 +30,11 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Extract version from tag - name: Get version
id: get_version id: get_version
shell: bash shell: bash
run: | run: |
tag="${GITHUB_REF_NAME}" version="${{ inputs.version || github.event.inputs.version }}"
version="${tag#v}"
echo "Extracted version: $version" echo "Extracted version: $version"
echo "VERSION=$version" >> "$GITHUB_OUTPUT" echo "VERSION=$version" >> "$GITHUB_OUTPUT"
@@ -240,18 +248,16 @@ jobs:
- name: Create/Update draft release - name: Create/Update draft release
uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@v2
with: with:
tag_name: ${{ github.ref_name }} tag_name: v${{ steps.get_version.outputs.VERSION }}
name: YTSage ${{ github.ref_name }} name: YTSage v${{ steps.get_version.outputs.VERSION }}
draft: true draft: true
prerelease: false prerelease: false
append_body: true append_body: true
fail_on_unmatched_files: false fail_on_unmatched_files: false
body: | body: |
# YTSage ${{ github.ref_name }} # YTSage v${{ steps.get_version.outputs.VERSION }}
**Release Date**: ${{ github.event.head_commit.timestamp }} **Release Date**: ${{ github.event.head_commit.timestamp }}
**Full Changelog**: https://github.com/${{ github.repository }}/compare/${{ github.ref_name }}
files: | files: |
artifacts/* artifacts/*
env: env:
+17 -11
View File
@@ -1,9 +1,18 @@
name: Build Windows Release name: Build Windows Release
on: on:
push: workflow_dispatch:
tags: inputs:
- 'v*' version:
description: 'Version name for the release (e.g., 1.0.0)'
required: true
type: string
workflow_call:
inputs:
version:
description: 'Version name for the release (e.g., 1.0.0)'
required: true
type: string
permissions: permissions:
contents: write contents: write
@@ -21,12 +30,11 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Extract version from tag - name: Get version
id: get_version id: get_version
shell: powershell shell: powershell
run: | run: |
$tag = "${{ github.ref_name }}" $version = "${{ inputs.version || github.event.inputs.version }}"
$version = $tag -replace '^v', ''
Write-Host "Extracted version: $version" Write-Host "Extracted version: $version"
echo "VERSION=$version" >> $env:GITHUB_OUTPUT echo "VERSION=$version" >> $env:GITHUB_OUTPUT
@@ -298,16 +306,14 @@ jobs:
- name: Create draft release - name: Create draft release
uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@v2
with: with:
tag_name: ${{ github.ref_name }} tag_name: v${{ steps.get_version.outputs.VERSION }}
name: YTSage ${{ github.ref_name }} name: YTSage v${{ steps.get_version.outputs.VERSION }}
draft: true draft: true
prerelease: false prerelease: false
body: | body: |
# YTSage ${{ github.ref_name }} # YTSage v${{ steps.get_version.outputs.VERSION }}
**Release Date**: ${{ github.event.head_commit.timestamp }} **Release Date**: ${{ github.event.head_commit.timestamp }}
**Full Changelog**: https://github.com/${{ github.repository }}/compare/${{ github.ref_name }}
files: | files: |
artifacts/* artifacts/*
env: env:
+28
View File
@@ -0,0 +1,28 @@
name: Create All Releases
on:
workflow_dispatch:
inputs:
version:
description: 'Version name for the release (e.g., 1.0.0)'
required: true
type: string
jobs:
release-windows:
uses: ./.github/workflows/build-windows.yml
with:
version: ${{ inputs.version }}
secrets: inherit
release-linux:
uses: ./.github/workflows/build-linux.yml
with:
version: ${{ inputs.version }}
secrets: inherit
release-macos:
uses: ./.github/workflows/build-macos.yml
with:
version: ${{ inputs.version }}
secrets: inherit