diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index c81f051..6e3fcab 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -1,9 +1,18 @@ name: Build Linux Release on: - push: - tags: - - 'v*' + workflow_dispatch: + inputs: + 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: contents: write @@ -21,12 +30,11 @@ jobs: with: fetch-depth: 0 - - name: Extract version from tag + - name: Get version id: get_version shell: bash run: | - tag="${GITHUB_REF_NAME}" - version="${tag#v}" + version="${{ inputs.version || github.event.inputs.version }}" echo "Extracted version: $version" echo "VERSION=$version" >> "$GITHUB_OUTPUT" @@ -405,18 +413,16 @@ jobs: - name: Create/Update draft release uses: softprops/action-gh-release@v2 with: - tag_name: ${{ github.ref_name }} - name: YTSage ${{ github.ref_name }} + tag_name: v${{ steps.get_version.outputs.VERSION }} + name: YTSage v${{ steps.get_version.outputs.VERSION }} draft: true prerelease: false append_body: true fail_on_unmatched_files: false body: | - # YTSage ${{ github.ref_name }} + # YTSage v${{ steps.get_version.outputs.VERSION }} **Release Date**: ${{ github.event.head_commit.timestamp }} - - **Full Changelog**: https://github.com/${{ github.repository }}/compare/${{ github.ref_name }} files: | artifacts/* env: diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index b57164b..5531531 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -1,9 +1,18 @@ name: Build macOS Release on: - push: - tags: - - 'v*' + workflow_dispatch: + inputs: + 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: contents: write @@ -21,12 +30,11 @@ jobs: with: fetch-depth: 0 - - name: Extract version from tag + - name: Get version id: get_version shell: bash run: | - tag="${GITHUB_REF_NAME}" - version="${tag#v}" + version="${{ inputs.version || github.event.inputs.version }}" echo "Extracted version: $version" echo "VERSION=$version" >> "$GITHUB_OUTPUT" @@ -240,18 +248,16 @@ jobs: - name: Create/Update draft release uses: softprops/action-gh-release@v2 with: - tag_name: ${{ github.ref_name }} - name: YTSage ${{ github.ref_name }} + tag_name: v${{ steps.get_version.outputs.VERSION }} + name: YTSage v${{ steps.get_version.outputs.VERSION }} draft: true prerelease: false append_body: true fail_on_unmatched_files: false body: | - # YTSage ${{ github.ref_name }} + # YTSage v${{ steps.get_version.outputs.VERSION }} **Release Date**: ${{ github.event.head_commit.timestamp }} - - **Full Changelog**: https://github.com/${{ github.repository }}/compare/${{ github.ref_name }} files: | artifacts/* env: diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index f2e1220..b64a4b3 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -1,9 +1,18 @@ name: Build Windows Release on: - push: - tags: - - 'v*' + workflow_dispatch: + inputs: + 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: contents: write @@ -21,12 +30,11 @@ jobs: with: fetch-depth: 0 - - name: Extract version from tag + - name: Get version id: get_version shell: powershell run: | - $tag = "${{ github.ref_name }}" - $version = $tag -replace '^v', '' + $version = "${{ inputs.version || github.event.inputs.version }}" Write-Host "Extracted version: $version" echo "VERSION=$version" >> $env:GITHUB_OUTPUT @@ -298,16 +306,14 @@ jobs: - name: Create draft release uses: softprops/action-gh-release@v2 with: - tag_name: ${{ github.ref_name }} - name: YTSage ${{ github.ref_name }} + tag_name: v${{ steps.get_version.outputs.VERSION }} + name: YTSage v${{ steps.get_version.outputs.VERSION }} draft: true prerelease: false body: | - # YTSage ${{ github.ref_name }} + # YTSage v${{ steps.get_version.outputs.VERSION }} **Release Date**: ${{ github.event.head_commit.timestamp }} - - **Full Changelog**: https://github.com/${{ github.repository }}/compare/${{ github.ref_name }} files: | artifacts/* env: diff --git a/.github/workflows/release-all.yml b/.github/workflows/release-all.yml new file mode 100644 index 0000000..7e0fdef --- /dev/null +++ b/.github/workflows/release-all.yml @@ -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