Skip to content

Commit 5adc0c3

Browse files
committed
choco: use the full path of nupkg for pushing to community feed
using a glob pattern with '*' in the name doesn't work the generated nupkg file name is of the form 'crc.2.19.0.nupkg' so we first strip the leading 'v' from the tag name and set a shell varible CRC_VERSION with the version number and use it while running `choco push`
1 parent 3b87203 commit 5adc0c3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/choco-release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ jobs:
2929
CHOCO_API_KEY: ${{ secrets.CHOCO_API_KEY }}
3030
run: choco apikey --key "$env:CHOCO_API_KEY" --source https://push.chocolatey.org/
3131
- name: Push the choco to community.chocolatey.org
32-
run: choco push ./packaging/chocolatey/crc/*.nupkg --source https://push.chocolatey.org/
32+
shell: bash
33+
run: |
34+
CRC_VERSION=${{ github.event.release.tag_name }}
35+
CRC_VERSION=${CRC_VERSION:1}
36+
choco push ./packaging/chocolatey/crc/crc.$CRC_VERSION.nupkg --source https://push.chocolatey.org/
3337
- name: Upload nupkg artifact
3438
uses: actions/upload-artifact@v3
3539
with:

0 commit comments

Comments
 (0)