Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: gerardog/gsudo
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.0.1
Choose a base ref
...
head repository: gerardog/gsudo
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Nov 10, 2022

  1. Fixed issue with --copyEV

    gerardog committed Nov 10, 2022
    Copy the full SHA
    28abba4 View commit details
  2. Copy the full SHA
    4752e60 View commit details

Commits on Nov 11, 2022

  1. Copy the full SHA
    c3144b1 View commit details
  2. Installer: Allow upgrade with gsudo.exe in use. Uninstall with file i…

    …n use will also work, and remove from path, but will fail to delete the file in use.
    gerardog committed Nov 11, 2022
    Copy the full SHA
    bce6013 View commit details

Commits on Nov 16, 2022

  1. chore(deps): bump loader-utils from 2.0.3 to 2.0.4

    Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.3 to 2.0.4.
    - [Release notes](https://github.com/webpack/loader-utils/releases)
    - [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.4/CHANGELOG.md)
    - [Commits](webpack/loader-utils@v2.0.3...v2.0.4)
    
    ---
    updated-dependencies:
    - dependency-name: loader-utils
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Nov 16, 2022
    Copy the full SHA
    0cf7c8e View commit details
  2. Merge pull request #206 from gerardog/dependabot/npm_and_yarn/loader-…

    …utils-2.0.4
    
    chore(deps): bump loader-utils from 2.0.3 to 2.0.4
    gerardog authored Nov 16, 2022
    Copy the full SHA
    568eeb7 View commit details

Commits on Nov 17, 2022

  1. Copy the full SHA
    d2d91f4 View commit details

Commits on Nov 18, 2022

  1. Fix: On Powershell >= 7.3, when receiving a string literal command, r…

    …eplacing " with \" is no longer needed.
    gerardog committed Nov 18, 2022
    Copy the full SHA
    74c4a46 View commit details

Commits on Nov 21, 2022

  1. Fixed Initialization

    gerardog committed Nov 21, 2022
    Copy the full SHA
    506efa0 View commit details
  2. Copy the full SHA
    5b19673 View commit details

Commits on Nov 22, 2022

  1. Copy the full SHA
    7d67117 View commit details
  2. Copy the full SHA
    392f2af View commit details

Commits on Nov 23, 2022

  1. Copy the full SHA
    75c50fa View commit details

Commits on Nov 28, 2022

  1. Copy the full SHA
    a9d93ac View commit details
  2. Copy the full SHA
    9a9abe1 View commit details
  3. Update README.md

    gerardog authored Nov 28, 2022
    Copy the full SHA
    e376109 View commit details

Commits on Nov 29, 2022

  1. Copy the full SHA
    9b3d0d1 View commit details
  2. Copy the full SHA
    d6ba33c View commit details

Commits on Nov 30, 2022

  1. Merge pull request #214 from gerardog/Feature.Arm64Build

    Feat: Add net70-arm64 build, remove net46
    gerardog authored Nov 30, 2022
    Copy the full SHA
    a221cc7 View commit details
  2. Copy the full SHA
    455084d View commit details
  3. Copy the full SHA
    d2ad119 View commit details
  4. Copy the full SHA
    bb16b8b View commit details

Commits on Jan 8, 2023

  1. chore(deps): bump json5 from 2.2.1 to 2.2.3

    Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.3.
    - [Release notes](https://github.com/json5/json5/releases)
    - [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
    - [Commits](json5/json5@v2.2.1...v2.2.3)
    
    ---
    updated-dependencies:
    - dependency-name: json5
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Jan 8, 2023
    Copy the full SHA
    af421e8 View commit details

Commits on Jan 9, 2023

  1. Merge pull request #225 from gerardog/dependabot/npm_and_yarn/json5-2…

    ….2.3
    
    chore(deps): bump json5 from 2.2.1 to 2.2.3
    gerardog authored Jan 9, 2023
    Copy the full SHA
    986ad43 View commit details

Commits on Jan 27, 2023

  1. chore(deps): bump ua-parser-js from 0.7.32 to 0.7.33

    Bumps [ua-parser-js](https://github.com/faisalman/ua-parser-js) from 0.7.32 to 0.7.33.
    - [Release notes](https://github.com/faisalman/ua-parser-js/releases)
    - [Changelog](https://github.com/faisalman/ua-parser-js/blob/master/changelog.md)
    - [Commits](faisalman/ua-parser-js@0.7.32...0.7.33)
    
    ---
    updated-dependencies:
    - dependency-name: ua-parser-js
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Jan 27, 2023
    Copy the full SHA
    20abc39 View commit details

Commits on Feb 1, 2023

  1. Copy the full SHA
    ea4a4b6 View commit details

Commits on Feb 4, 2023

  1. chore(deps): bump http-cache-semantics from 4.1.0 to 4.1.1

    Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
    - [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
    - [Commits](kornelski/http-cache-semantics@v4.1.0...v4.1.1)
    
    ---
    updated-dependencies:
    - dependency-name: http-cache-semantics
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Feb 4, 2023
    Copy the full SHA
    227ee87 View commit details

Commits on Feb 17, 2023

  1. Publish to NuGet

    gerardog committed Feb 17, 2023
    Copy the full SHA
    d7a2b16 View commit details
  2. Publish to NuGet

    gerardog committed Feb 17, 2023
    Copy the full SHA
    7b64557 View commit details
  3. Copy the full SHA
    01ab586 View commit details
  4. gsudo nuget package

    gerardog committed Feb 17, 2023
    Copy the full SHA
    0d34315 View commit details
  5. Copy the full SHA
    3c9c563 View commit details
  6. Copy the full SHA
    cdbd385 View commit details

Commits on Feb 18, 2023

  1. Copy the full SHA
    b5d7c55 View commit details

Commits on Feb 20, 2023

  1. Copy the full SHA
    34fd69e View commit details
  2. Fix pkg description

    gerardog committed Feb 20, 2023
    Copy the full SHA
    2b5aa58 View commit details
  3. Copy the full SHA
    41adac2 View commit details
  4. Merge pull request #230 from gerardog/dependabot/npm_and_yarn/ua-pars…

    …er-js-0.7.33
    
    chore(deps): bump ua-parser-js from 0.7.32 to 0.7.33
    gerardog authored Feb 20, 2023
    Copy the full SHA
    b92aedf View commit details
  5. Merge pull request #231 from gerardog/dependabot/npm_and_yarn/http-ca…

    …che-semantics-4.1.1
    
    chore(deps): bump http-cache-semantics from 4.1.0 to 4.1.1
    gerardog authored Feb 20, 2023
    Copy the full SHA
    1f4c272 View commit details
  6. Copy the full SHA
    7fe26a0 View commit details
  7. Merge pull request #218 from gerardog/Fix.Windows7

    Fixed `Windows 7` issue enumerating named pipes
    gerardog authored Feb 20, 2023
    Copy the full SHA
    95719dd View commit details
  8. Fix for #228

    gerardog authored Feb 20, 2023
    Copy the full SHA
    0cf4815 View commit details
  9. Update installgsudo.ps1

    gerardog authored Feb 20, 2023
    Copy the full SHA
    ec5d4b8 View commit details

Commits on Mar 2, 2023

  1. Copy the full SHA
    624c1b3 View commit details
  2. Copy the full SHA
    7a54115 View commit details
  3. Copy the full SHA
    ce4bd32 View commit details

Commits on Mar 15, 2023

  1. chore(deps): bump webpack from 5.74.0 to 5.76.1

    Bumps [webpack](https://github.com/webpack/webpack) from 5.74.0 to 5.76.1.
    - [Release notes](https://github.com/webpack/webpack/releases)
    - [Commits](webpack/webpack@v5.74.0...v5.76.1)
    
    ---
    updated-dependencies:
    - dependency-name: webpack
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Mar 15, 2023
    Copy the full SHA
    027029f View commit details
  2. Merge pull request #241 from gerardog/dependabot/npm_and_yarn/webpack…

    …-5.76.1
    
    chore(deps): bump webpack from 5.74.0 to 5.76.1
    gerardog authored Mar 15, 2023
    Copy the full SHA
    a53d83d View commit details
  3. chore(deps): bump @sideway/formula from 3.0.0 to 3.0.1

    Bumps [@sideway/formula](https://github.com/sideway/formula) from 3.0.0 to 3.0.1.
    - [Release notes](https://github.com/sideway/formula/releases)
    - [Commits](hapijs/formula@v3.0.0...v3.0.1)
    
    ---
    updated-dependencies:
    - dependency-name: "@sideway/formula"
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Mar 15, 2023
    Copy the full SHA
    c5821a8 View commit details

Commits on Mar 17, 2023

  1. Copy the full SHA
    cfd4303 View commit details
Showing with 3,358 additions and 1,455 deletions.
  1. +2 −2 .github/FUNDING.yml
  2. +2 −2 .github/ISSUE_TEMPLATE/bug_report.md
  3. +17 −4 .github/workflows/ci.yml
  4. +57 −11 .github/workflows/release.yml
  5. +21 −0 .github/workflows/winget-solo.yml
  6. +84 −72 README.md
  7. +1 −1 SECURITY.md
  8. +3 −3 build/00-prerequisites.ps1
  9. +34 −11 build/01-build.ps1
  10. +3 −3 build/03-sign.ps1
  11. +41 −0 build/04-build-installer.ps1
  12. +0 −35 build/04-release-GitHub.ps1
  13. +3 −3 build/05-release-Chocolatey.ps1
  14. +28 −0 build/06-release-Nuget.ps1
  15. +0 −1 build/06-release-Scoop.ps1
  16. +1 −1 build/Chocolatey/ReadMe.md
  17. +11 −6 build/Chocolatey/gsudo/tools/chocolateyinstall.ps1
  18. +40 −0 build/Nuget/gsudo.csproj
  19. +33 −0 build/Nuget/gsudo.targets
  20. +1 −1 docs/blog/2022-08-21-dotnet7/index.md
  21. +75 −0 docs/docs/gsudo-vs-sudo.md
  22. +2 −2 docs/docs/install.md
  23. +1 −1 docs/docs/intro.md
  24. +17 −13 docs/docs/security.md
  25. +1 −1 docs/docs/tips/elevation-in-new-window.md
  26. +106 −55 docs/docs/tips/script-self-elevation.md
  27. +1 −1 docs/docs/troubleshooting.md
  28. +1 −1 docs/docs/usage/mingw-msys2.md
  29. +66 −39 docs/docs/usage/powershell.md
  30. +3 −2 docs/docs/usage/usage.md
  31. +3 −3 docs/docusaurus.config.js
  32. +1 −1 docs/src/components/HomepageFeatures/index.js
  33. +1 −1 docs/src/pages/index.js
  34. +10 −6 docs/src/pages/sponsor.md
  35. BIN docs/static/img/gsudo-powershell-prompt.gif
  36. BIN docs/static/img/gsudo-powershell-prompt.mp4
  37. +6 −0 global.json
  38. +13 −3 installgsudo.ps1
  39. +4 −4 package.json
  40. +36 −0 sample-scripts/many-elevations-using-gsudo-cache.cmd
  41. +32 −0 sample-scripts/many-elevations-using-gsudo-cache.ps1
  42. +21 −0 sample-scripts/readme.md
  43. +2 −0 sample-scripts/self-elevate-one-liner.cmd
  44. +27 −0 sample-scripts/self-elevate-without-gsudo.cmd
  45. +10 −0 sample-scripts/self-elevate.cmd
  46. +14 −0 sample-scripts/self-elevate.ps1
  47. +10 −0 sample-scripts/silent-elevation-one-liner.cmd
  48. +37 −0 sample-scripts/silent-elevation.cmd
  49. +37 −25 src/gsudo.Installer.sln
  50. +2 −3 src/gsudo.Installer/Constants.Template.wxi
  51. +123 −112 src/gsudo.Installer/Product.wxs
  52. +29 −46 src/gsudo.Installer/gsudomsi.wixproj
  53. +0 −5 src/gsudo.Installer/packages.config
  54. +1 −1 src/gsudo.Wrappers.Tests/Invoke-gsudo.Tests.ps1
  55. +182 −0 src/gsudo.Wrappers/Invoke-ElevatedCommand.ps1
  56. +15 −11 src/gsudo.Wrappers/Invoke-gsudo.ps1
  57. +2 −1 src/gsudo.Wrappers/gsudo
  58. +2 −2 src/gsudo.Wrappers/gsudoModule.psd1
  59. +224 −28 src/gsudo.Wrappers/gsudoModule.psm1
  60. +67 −0 src/gsudo/AppSettings/PathPrecedenceSetting.cs
  61. +7 −5 src/gsudo/AppSettings/RegistrySetting.cs
  62. +54 −20 src/gsudo/AppSettings/Settings.cs
  63. +0 −60 src/gsudo/Commands/AttachRunCommand.cs
  64. +1 −2 src/gsudo/Commands/BangBangCommand.cs
  65. +10 −10 src/gsudo/Commands/CacheCommand.cs
  66. +15 −2 src/gsudo/Commands/ConfigCommand.cs
  67. +90 −88 src/gsudo/Commands/HelpCommand.cs
  68. +85 −60 src/gsudo/Commands/RunCommand.cs
  69. +4 −2 src/gsudo/Commands/ServiceCommand.cs
  70. +145 −37 src/gsudo/Commands/StatusCommand.cs
  71. +3 −2 src/gsudo/ElevationRequest.cs
  72. +39 −5 src/gsudo/Helpers/CommandLineParser.cs
  73. +37 −19 src/gsudo/Helpers/CommandToRunAdapter.cs
  74. +44 −4 src/gsudo/Helpers/ConsoleHelper.cs
  75. +101 −11 src/gsudo/Helpers/ProcessFactory.cs
  76. +16 −14 src/gsudo/Helpers/ProcessHelper.cs
  77. +199 −93 src/gsudo/Helpers/ServiceHelper.cs
  78. +60 −51 src/gsudo/Helpers/ShellHelper.cs
  79. +46 −0 src/gsudo/Helpers/UACWindowFocusHelper.cs
  80. +4 −0 src/gsudo/InputParameters.cs
  81. +3 −0 src/gsudo/Native/FileApi.cs
  82. +38 −18 src/gsudo/{Tokens → Native}/NativeMethods.cs
  83. +19 −3 src/gsudo/Native/ProcessApi.cs
  84. +15 −0 src/gsudo/Native/SafeTokenHandle.cs
  85. +14 −2 src/gsudo/Native/TokensApi.cs
  86. +2 −5 src/gsudo/ProcessHosts/AttachedConsoleHost.cs
  87. +2 −2 src/gsudo/ProcessHosts/PipedProcessHost.cs
  88. +0 −3 src/gsudo/ProcessHosts/TokenSwitchHost.cs
  89. +32 −30 src/gsudo/ProcessRenderers/TokenSwitchRenderer.cs
  90. +1 −1 src/gsudo/ProcessRenderers/VTClientRenderer.cs
  91. +2 −2 src/gsudo/Program.cs
  92. +1 −3 src/gsudo/Rpc/Connection.cs
  93. +3 −2 src/gsudo/Rpc/IRpcClient.cs
  94. +42 −83 src/gsudo/Rpc/NamedPipeClient.cs
  95. +4 −2 src/gsudo/Rpc/NamedPipeNameFactory.cs
  96. +1 −1 src/gsudo/Rpc/NamedPipeServer.cs
  97. +18 −16 src/gsudo/Rpc/NamedPipeUtils.cs
  98. +2 −1 src/gsudo/Tokens/PrivilegeManager.cs
  99. +41 −16 src/gsudo/Tokens/TokenSwitcher.cs
  100. +6 −0 src/gsudo/gsudo.csproj
  101. +586 −257 yarn.lock
4 changes: 2 additions & 2 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
github: gerardog
patreon: # gerardog
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
@@ -9,4 +9,4 @@ liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: ['https://gerardog.github.io/gsudo/sponsor']
custom: ['https://www.paypal.com/donate/?business=EGM43RDQ4VRWJ&no_recurring=0&item_name=%0APlease+help+me+dedicate+more+time+to+gsudo%21%0AIf+gsudo+has+improved+your+productivity%2C+please+contribute%21&currency_code=USD']
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ assignees: ''
Your issue may already be reported!
Before creating one, please search https://github.com/gerardog/gsudo/issues?q=
-->
<!-- If the issue ocurred using the 'sudo' alias, please retry using `gsudo` instead, and let me know if that fixes it. -->
<!-- If the issue occurred using the 'sudo' alias, please retry using `gsudo` instead, and let me know if that fixes it. -->

## Issue Description
<!-- What were you trying to do? What happened? And what were you expecting? -->
@@ -28,6 +28,6 @@ Before creating one, please search https://github.com/gerardog/gsudo/issues?q=
## Context:
- Windows version:
<!-- To get Windows version, press Win+R, type `winver` and press enter.
For example: Win11 21H2 - Spanish ->
For example: Win11 21H2 - Spanish -->
- gsudo version:
<!-- Run `gsudo -v` to get gsudo version -->
21 changes: 17 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -5,7 +5,10 @@ on:
branches:
- '**'
tags-ignore:
- '**'
- '**'
pull_request:
branches:
- '**'
workflow_call:
outputs:
version:
@@ -14,6 +17,9 @@ on:
version_MajorMinorPatch:
description: "Version (without prerelease tag)"
value: ${{ jobs.build.outputs.version_MajorMinorPatch }}
is_prerelease:
description: "Version prerelease ($true or $false)"
value: ${{ jobs.build.outputs.is_prerelease }}

jobs:
test:
@@ -70,14 +76,20 @@ jobs:
with:
fetch-depth: 0
- name: Install dependencies
run: choco install GitVersion.Portable ilmerge --confirm --no-progress
run: choco install GitVersion.Portable --version 5.6.11 --confirm --no-progress; choco install il-repack --confirm --no-progress
- name: Update project version
run: gitversion /l console /output buildserver /updateAssemblyInfo /verbosity minimal
- name: Get project version
id: getversion
run: |
echo "::set-output name=version::$(gitversion /showvariable LegacySemVer)"
echo "::set-output name=version_MajorMinorPatch::$(gitversion /showvariable MajorMinorPatch)"
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=0" >> "$env:GITHUB_OUTPUT"
} else {
echo "is_prerelease=1" >> "$env:GITHUB_OUTPUT"
}
get-content "$env:GITHUB_OUTPUT"
- name: Build
run: ./build/01-build.ps1
- name: Upload build artifacts
@@ -88,3 +100,4 @@ jobs:
outputs:
version: ${{ steps.getversion.outputs.version }}
version_MajorMinorPatch: ${{ steps.getversion.outputs.version_MajorMinorPatch }}
is_prerelease: ${{ steps.getversion.outputs.is_prerelease }}
68 changes: 57 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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
@@ -26,11 +26,12 @@ jobs:
cert_key: ${{ secrets.P_F_X_Key }}
version: ${{ needs.build.outputs.version }}
version_MajorMinorPatch: ${{ needs.build.outputs.version_MajorMinorPatch }}
is_prerelease: ${{ needs.build.outputs.is_prerelease }}
permissions:
contents: write
steps:
- name: Install dependencies
run: choco install GitVersion.Portable wixtoolset --confirm --no-progress
run: choco install GitVersion.Portable --version 5.6.11 --confirm --no-progress; choco install NuGet.CommandLine GitVersion.Portable wixtoolset --confirm --no-progress
- uses: actions/checkout@v2
with:
fetch-depth: 0
@@ -51,22 +52,23 @@ jobs:
with:
name: Binaries
path: ./artifacts
- name: Package for GitHub Release
run: ./build/04-release-GitHub.ps1
- name: Build Installer
run: ./build/04-build-installer.ps1
- name: Remove the pfx
run: Remove-Item -path $env:cert_path
- name: Upload installer artifacts
uses: actions/upload-artifact@v3
with:
name: Installer
path: ./artifacts/gsudoSetup.msi
path: ./artifacts/*.msi
- name: Create Release
uses: ncipollo/release-action@v1.11.1
uses: ncipollo/release-action@v1.12.0
with:
artifacts: "artifacts/*.*"
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
prerelease: true
prerelease: ${{ env.is_prerelease==1 }}
make_latest: false
generateReleaseNotes: true
name: gsudo v${{env.version}}
tag: v${{env.version}}
@@ -77,30 +79,48 @@ jobs:
replacesArtifacts: true

publish:
name: Publish + Push to Choco & Winget
name: Publish Release
#if: github.ref == 'refs/heads/master' && github.repository == 'gerardog/gsudo'
if: github.repository == 'gerardog/gsudo'
runs-on: windows-latest
needs: [build, release]
permissions:
contents: write
environment:
name: release-chocolatey
name: release-github-publish
env:
version: ${{ needs.build.outputs.version }}
version_MajorMinorPatch: ${{ needs.build.outputs.version_MajorMinorPatch }}
is_prerelease: ${{ needs.build.outputs.is_prerelease }}
steps:
- name: Publish Release
uses: ncipollo/release-action@v1.10.0
uses: ncipollo/release-action@v1.12.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: gsudo v${{env.version}}
tag: v${{env.version}}
commit: ${{env.GITHUB_SHA}}
draft: false
prerelease: ${{ env.is_prerelease == 1}}
makelatest: ${{ env.is_prerelease == 0}}
allowUpdates: true
omitBodyDuringUpdate: true
omitPrereleaseDuringUpdate: true

publishChocoWinGet:
name: Push to Chocolatey & Winget
if: github.repository == 'gerardog/gsudo'
runs-on: windows-latest
needs: [build, publish]
permissions:
contents: write
environment:
name: release-chocolatey
env:
version: ${{ needs.build.outputs.version }}
version_MajorMinorPatch: ${{ needs.build.outputs.version_MajorMinorPatch }}
is_prerelease: ${{ needs.build.outputs.is_prerelease }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
@@ -118,12 +138,38 @@ jobs:
name: Binaries
path: ./artifacts
- name: WinGet Releaser
uses: vedantmgoyal2009/winget-releaser@v1
uses: vedantmgoyal9/winget-releaser@main
if: ${{ env.is_prerelease == 0 }}
with:
token: ${{ secrets.WINGET_RELEASER_TOKEN }}
identifier: gerardog.gsudo
installers-regex: '\.msi$' # Only .msi files

publishNuget:
name: Push to Nuget
if: github.repository == 'gerardog/gsudo'
runs-on: windows-latest
needs: [build, publishChocoWinGet]
permissions:
contents: write
environment:
name: release-nuget
env:
version: ${{ needs.build.outputs.version }}
version_MajorMinorPatch: ${{ needs.build.outputs.version_MajorMinorPatch }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/download-artifact@v3
with:
name: Binaries
path: ./artifacts
- name: Import Nuget Api Key
run: nuget setapikey ${{ secrets.NUGET_APIKEY }}
- name: Build Package for Nuget & Upload
run: ./build/06-release-Nuget.ps1

docs:
needs: publish
uses: ./.github/workflows/docs.yml
21 changes: 21 additions & 0 deletions .github/workflows/winget-solo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Winget manual dispatch

on:
workflow_dispatch:

jobs:
publishToWinGet:
name: Push to Winget
if: github.repository == 'gerardog/gsudo'
runs-on: windows-latest
permissions:
contents: write
environment:
name: release-chocolatey
steps:
- name: WinGet Releaser
uses: vedantmgoyal9/winget-releaser@main
with:
token: ${{ secrets.WINGET_RELEASER_TOKEN }}
identifier: gerardog.gsudo
installers-regex: '\.msi$' # Only .msi files
Loading