diff options
author | Batuhan Taskaya <isidentical@gmail.com> | 2022-05-06 20:47:40 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-06 20:47:40 +0300 |
commit | dc5274e491b48d8294d530eb12186df28bf9d1b7 (patch) | |
tree | cbb461e730fd5c4655ba81b5a62f44659c5af4f4 | |
parent | ad2b86ccf41eeccb631c0dc40314527407f1ec41 (diff) |
Use the proper directory name for the choco action. (#1392)
* Use the proper directory name for the choco action.
* Refresh the current environment to reflect the new installation.
-rw-r--r-- | .github/workflows/release-choco.yml | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/.github/workflows/release-choco.yml b/.github/workflows/release-choco.yml index 09b5393d..01e0c406 100644 --- a/.github/workflows/release-choco.yml +++ b/.github/workflows/release-choco.yml @@ -13,7 +13,7 @@ jobs: name: Release the Chocolatey runs-on: windows-2019 env: - package-dir: ./httpie/docs/packaging/windows-chocolatey + package-dir: docs\packaging\windows-chocolatey steps: - uses: actions/checkout@v3 @@ -30,9 +30,21 @@ jobs: run: choco info httpie -s . working-directory: ${{ env.package-dir }} - - name: Check the Installation + - name: Local installation run: | choco install httpie -y -dv -s "'.;https://community.chocolatey.org/api/v2/'" + working-directory: ${{ env.package-dir }} + + - name: Test the locally installed binaries + run: | + # Source: https://stackoverflow.com/a/46760714/15330941 + + # Make `refreshenv` available right away, by defining the $env:ChocolateyInstall + # variable and importing the Chocolatey profile module. + $env:ChocolateyInstall = Convert-Path "$((Get-Command choco).Path)\..\.." + Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" + refreshenv + http --version https --version httpie --version @@ -46,3 +58,4 @@ jobs: run: | choco apikey --key $CHOCO_API_KEY --source https://push.chocolatey.org/ choco push httpie*.nupkg --source https://push.chocolatey.org/ + working-directory: ${{ env.package-dir }} |