Skip to content

Commit

Permalink
Fine-tune release script
Browse files Browse the repository at this point in the history
  • Loading branch information
ylabonte committed Feb 26, 2024
1 parent 7e6669e commit 8907587
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release

on:
push:
tags: [v*]
tags: [WindowsEnvLoader-v*]

jobs:
release:
Expand All @@ -19,6 +19,12 @@ jobs:
git config --global user.name github-actions
git config --global user.email [email protected]
- name: Run release script
- name: Build and publish via Github Pages
shell: pwsh
run: ./release.ps1

- name: Add Setup.exe to Release Assets
uses: softprops/action-gh-release@v1
with:
files: WindowsEnvLoader/bin/publish/setup.exe

6 changes: 3 additions & 3 deletions WindowsEnvLoader/release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ $tag = $(git describe --tags)
Write-Output "Tag: $tag"

# Parse tag into a three-number version.
$version = $tag.Split('-')[0].TrimStart('v')
$version = $tag.Split('-')[1].TrimStart('v')
$version = "$version.0"
Write-Output "Version: $version"

Expand All @@ -34,7 +34,7 @@ $outDir = "$projDir/$publishDir"
if (Test-Path $outDir) {
Remove-Item -Path $outDir -Recurse
}
git

# Publish the application.
Push-Location $projDir
try {
Expand Down Expand Up @@ -89,7 +89,7 @@ try {
Write-Output "Staging..."
git add -A
Write-Output "Committing..."
git commit -m "Update to v$version"
git commit -m "Update to WindowsEnvLoader v$version"

# Push.
git push
Expand Down

0 comments on commit 8907587

Please sign in to comment.