diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yaml index 603739f5..0cc68253 100644 --- a/.github/workflows/pre-release.yaml +++ b/.github/workflows/pre-release.yaml @@ -22,7 +22,7 @@ jobs: $version = '' Get-Content ./winutil.ps1 -TotalCount 30 | ForEach-Object { if ($_ -match 'Version\s*:\s*(\d{2}\.\d{2}\.\d{2})') { - $version = $matches[1] + $version = "pre"+$matches[1] echo "version=$version" >> $GITHUB_ENV echo "::set-output name=version::$version" break diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6728470a..6d59bb73 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -38,5 +38,6 @@ jobs: name: Release ${{ steps.extract_version.outputs.version }} files: ./winutil.ps1 prerelease: false + make_latest: "true" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/windev.ps1 b/windev.ps1 index 986bf52c..2efc3e77 100644 --- a/windev.ps1 +++ b/windev.ps1 @@ -16,7 +16,7 @@ function Get-LatestRelease { try { $releases = Invoke-RestMethod -Uri 'https://api.github.com/repos/ChrisTitusTech/winutil/releases' - $latestRelease = $releases | Select-Object -First 1 + $latestRelease = $releases | Where-Object {$_.prerelease -eq $true} | Select-Object -First 1 return $latestRelease.tag_name } catch { Write-Host "Error fetching release data: $_" -ForegroundColor Red