mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-11-14 14:45:52 -06:00
Update pre-release.yaml
This commit is contained in:
parent
2af864f7ab
commit
2b3f1a811d
17
.github/workflows/pre-release.yaml
vendored
17
.github/workflows/pre-release.yaml
vendored
@ -74,19 +74,6 @@ jobs:
|
|||||||
name: winutil
|
name: winutil
|
||||||
path: ./winutil.ps1
|
path: ./winutil.ps1
|
||||||
|
|
||||||
- name: Get latest release tag
|
|
||||||
id: get_latest_release
|
|
||||||
run: |
|
|
||||||
git fetch --tags --force
|
|
||||||
$latestTag = git for-each-ref --sort=-creatordate --format '%(refname:short)' refs/tags --count 1
|
|
||||||
if ($LASTEXITCODE -ne 0 -or [string]::IsNullOrEmpty($latestTag)) {
|
|
||||||
Write-Error "Failed to get latest tag. Error code: $LASTEXITCODE"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
Write-Host "Latest tag: $latestTag"
|
|
||||||
echo "LATEST_TAG=$latestTag" >> $env:GITHUB_ENV
|
|
||||||
shell: pwsh
|
|
||||||
|
|
||||||
- name: Generate Release Notes
|
- name: Generate Release Notes
|
||||||
id: generate_notes
|
id: generate_notes
|
||||||
uses: release-drafter/release-drafter@v5
|
uses: release-drafter/release-drafter@v5
|
||||||
@ -95,7 +82,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
config-name: release-drafter.yml
|
config-name: release-drafter.yml
|
||||||
version: ${{ env.version }}
|
version: ${{ env.version }}
|
||||||
|
|
||||||
- name: Create and Upload Release
|
- name: Create and Upload Release
|
||||||
id: create_release
|
id: create_release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
@ -103,7 +90,7 @@ jobs:
|
|||||||
tag_name: ${{ env.version }}
|
tag_name: ${{ env.version }}
|
||||||
name: Pre-Release ${{ env.version }}
|
name: Pre-Release ${{ env.version }}
|
||||||
body: |
|
body: |
|
||||||
${{ steps.prepare_body.outputs.body }}
|
${{ steps.generate_notes.outputs.body }}
|
||||||
|
|
||||||
![GitHub Downloads (specific asset, specific tag)](https://img.shields.io/github/downloads/ChrisTitusTech/winutil/${{ env.VERSION }}/winutil.ps1)
|
![GitHub Downloads (specific asset, specific tag)](https://img.shields.io/github/downloads/ChrisTitusTech/winutil/${{ env.VERSION }}/winutil.ps1)
|
||||||
append_body: false
|
append_body: false
|
||||||
|
Loading…
Reference in New Issue
Block a user