Skip to content

Commit

Permalink
Build pipeline: fix winget releaser
Browse files Browse the repository at this point in the history
  • Loading branch information
gerardog committed Jul 9, 2023
1 parent c8b718a commit 5d19aea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ jobs:
echo "version=$(gitversion /showvariable LegacySemVer)" >> "$env:GITHUB_OUTPUT"
echo "version_MajorMinorPatch=$(gitversion /showvariable MajorMinorPatch)" >> "$env:GITHUB_OUTPUT"
if ("$(gitversion /showvariable PreReleaseTag)" -eq "") {
echo "is_prerelease=false" >> "$env:GITHUB_OUTPUT"
echo "is_prerelease=0" >> "$env:GITHUB_OUTPUT"
} else {
echo "is_prerelease=true" >> "$env:GITHUB_OUTPUT"
echo "is_prerelease=1" >> "$env:GITHUB_OUTPUT"
}
get-content "$env:GITHUB_OUTPUT"
- name: Build
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
checks: write

release:
name: Draft Release
name: Build Installer & Draft Release
#if: github.ref == 'refs/heads/master' && github.repository == 'gerardog/gsudo'
if: github.repository == 'gerardog/gsudo'
runs-on: windows-latest
Expand All @@ -27,7 +27,6 @@ jobs:
version: ${{ needs.build.outputs.version }}
version_MajorMinorPatch: ${{ needs.build.outputs.version_MajorMinorPatch }}
is_prerelease: ${{ needs.build.outputs.is_prerelease }}

permissions:
contents: write
steps:
Expand Down Expand Up @@ -68,7 +67,7 @@ jobs:
artifacts: "artifacts/*.*"
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
prerelease: ${{ env.is_prerelease }}
prerelease: ${{ env.is_prerelease=='true' }}
make_latest: false
generateReleaseNotes: true
name: gsudo v${{env.version}}
Expand Down Expand Up @@ -102,8 +101,8 @@ jobs:
tag: v${{env.version}}
commit: ${{env.GITHUB_SHA}}
draft: false
prerelease: ${{ env.is_prerelease }}
makelatest: ${{ !env.is_prerelease }}
prerelease: ${{ env.is_prerelease == 'true'}}
makelatest: ${{ env.is_prerelease == 'false'}}
allowUpdates: true
omitBodyDuringUpdate: true
omitPrereleaseDuringUpdate: true
Expand Down Expand Up @@ -140,7 +139,7 @@ jobs:
path: ./artifacts
- name: WinGet Releaser
uses: vedantmgoyal2009/winget-releaser@v2
if: ${{ !env.is_prerelease }}
if: ${{ env.is_prerelease == 'false' }}
with:
token: ${{ secrets.WINGET_RELEASER_TOKEN }}
identifier: gerardog.gsudo
Expand Down

0 comments on commit 5d19aea

Please sign in to comment.