mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-11-14 22:55:52 -06:00
Update pre-release.yaml
This commit is contained in:
parent
07434f706b
commit
1c72007a29
20
.github/workflows/pre-release.yaml
vendored
20
.github/workflows/pre-release.yaml
vendored
@ -1,8 +1,12 @@
|
|||||||
name: Pre-Release WinUtil
|
name: Pre-Release WinUtil
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
actions: read
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_run:
|
workflow_run:
|
||||||
workflows: ["Compile"] #Ensure Compile winget.ps1 is done
|
workflows: ["Compile"]
|
||||||
types:
|
types:
|
||||||
- completed
|
- completed
|
||||||
workflow_dispatch: # Manual trigger added
|
workflow_dispatch: # Manual trigger added
|
||||||
@ -19,18 +23,8 @@ jobs:
|
|||||||
- name: Extract Version from winutil.ps1
|
- name: Extract Version from winutil.ps1
|
||||||
id: extract_version
|
id: extract_version
|
||||||
run: |
|
run: |
|
||||||
$version = ''
|
$version = "pre" + (Get-Date -Format "yyyy-MM-dd")
|
||||||
Get-Content ./winutil.ps1 -TotalCount 30 | ForEach-Object {
|
echo "version=$version" >> $env:GITHUB_ENV
|
||||||
if ($_ -match 'Version\s*:\s*(\d{2}\.\d{2}\.\d{2})') {
|
|
||||||
$version = "pre"+$matches[1]
|
|
||||||
echo "version=$version" >> $GITHUB_OUTPUT
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (-not $version) {
|
|
||||||
Write-Error "Version not found in winutil.ps1"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
git tag $version
|
git tag $version
|
||||||
git push origin $version
|
git push origin $version
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
Loading…
Reference in New Issue
Block a user