mirror of
https://github.com/neosubhamoy/neodlp.git
synced 2026-05-06 19:45:50 +05:30
Allow manual workflow dispatches for tesitng
This commit is contained in:
18
.github/workflows/release.yml
vendored
18
.github/workflows/release.yml
vendored
@@ -2,6 +2,12 @@ on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*.*.*'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag_name:
|
||||
description: 'Draft release tag (e.g. v0.4.5-test)'
|
||||
required: true
|
||||
default: 'v0.0.0-test'
|
||||
|
||||
name: 🚀 Release on GitHub
|
||||
jobs:
|
||||
@@ -64,11 +70,11 @@ jobs:
|
||||
run: |
|
||||
if [ -f CHANGELOG.md ]; then
|
||||
# Extract version number from tag
|
||||
VERSION_NUM=$(echo "${{ github.ref_name }}" | sed -E 's/^v([0-9]+\.[0-9]+\.[0-9]+)(-.*)?$/\1/')
|
||||
VERSION_NUM=$(echo "${{ inputs.tag_name || github.ref_name }}" | sed -E 's/^v([0-9]+\.[0-9]+\.[0-9]+)(-.*)?$/\1/')
|
||||
|
||||
# Read and replace placeholders
|
||||
CONTENT=$(cat CHANGELOG.md)
|
||||
CONTENT=${CONTENT//<release_tag>/${{ github.ref_name }}}
|
||||
CONTENT=${CONTENT//<release_tag>/${{ inputs.tag_name || github.ref_name }}}
|
||||
CONTENT=${CONTENT//<version>/$VERSION_NUM}
|
||||
|
||||
echo "content<<EOF" >> $GITHUB_OUTPUT
|
||||
@@ -85,11 +91,11 @@ jobs:
|
||||
run: |
|
||||
if (Test-Path "CHANGELOG.md") {
|
||||
# Extract version number from tag
|
||||
$version_num = "${{ github.ref_name }}" -replace '^v([0-9]+\.[0-9]+\.[0-9]+)(-.*)?$','$1'
|
||||
$version_num = "${{ inputs.tag_name || github.ref_name }}" -replace '^v([0-9]+\.[0-9]+\.[0-9]+)(-.*)?$','$1'
|
||||
|
||||
# Read and replace placeholders
|
||||
$content = Get-Content -Path CHANGELOG.md -Raw
|
||||
$content = $content -replace '<release_tag>', "${{ github.ref_name }}"
|
||||
$content = $content -replace '<release_tag>', "${{ inputs.tag_name || github.ref_name }}"
|
||||
$content = $content -replace '<version>', "$version_num"
|
||||
|
||||
"content<<EOF" >> $env:GITHUB_OUTPUT
|
||||
@@ -106,8 +112,8 @@ jobs:
|
||||
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
||||
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
|
||||
with:
|
||||
tagName: ${{ github.ref_name }}
|
||||
releaseName: ${{ github.event.repository.name }}-${{ github.ref_name }}
|
||||
tagName: ${{ inputs.tag_name || github.ref_name }}
|
||||
releaseName: ${{ github.event.repository.name }}-${{ inputs.tag_name || github.ref_name }}
|
||||
releaseBody: ${{ (matrix.platform == 'windows-latest' || matrix.platform == 'windows-11-arm') && steps.changelog_windows.outputs.content || steps.changelog_unix.outputs.content }}
|
||||
releaseDraft: true
|
||||
prerelease: false
|
||||
|
||||
Reference in New Issue
Block a user