mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-11-14 22:55:52 -06:00
Update pre-release.yaml
bug fix and error handling
This commit is contained in:
parent
83bcf246f6
commit
fb1a0b919c
12
.github/workflows/pre-release.yaml
vendored
12
.github/workflows/pre-release.yaml
vendored
@ -14,11 +14,11 @@ jobs:
|
|||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Extract Version from winutil.ps1
|
- name: Set Version to Todays Date
|
||||||
id: extract_version
|
id: extract_version
|
||||||
run: |
|
run: |
|
||||||
$version = (Get-Date -Format "yy.MM.dd")
|
$version = (Get-Date -Format "yy.MM.dd")
|
||||||
echo "version=$version" >> $env:GITHUB_ENV
|
echo "VERSION=$version" >> $env:GITHUB_ENV
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
|
||||||
- name: Create Tag
|
- name: Create Tag
|
||||||
@ -27,7 +27,15 @@ jobs:
|
|||||||
$tagExists = git tag -l $env:VERSION
|
$tagExists = git tag -l $env:VERSION
|
||||||
if ($tagExists -eq "") {
|
if ($tagExists -eq "") {
|
||||||
git tag $env:VERSION
|
git tag $env:VERSION
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
Write-Error "Failed to create tag $env:VERSION"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
git push origin $env:VERSION
|
git push origin $env:VERSION
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
Write-Error "Failed to push tag $env:VERSION"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Write-Host "Tag $env:VERSION already exists, skipping tag creation"
|
Write-Host "Tag $env:VERSION already exists, skipping tag creation"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user