Skip to content

Commit

Permalink
chore: fix choco publish nupkg filename
Browse files Browse the repository at this point in the history
  • Loading branch information
rami3l committed Jun 13, 2020
1 parent 0c9fce1 commit 704da33
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,14 @@ jobs:

- name: Get the version
id: ver
run: import re; print('::set-output name=tag::{}'.format(re.sub('refs/\w+/', '' ,'${{ github.ref }}')))
run: |
import re
version = re.sub('refs/\w+/', '' ,'${{ github.ref }}')
print('::set-output name=tag::{}'.format(version))
# Pop off the leading 'v' in the tag
if version[0] == 'v': version = version[1:]
print('::set-output name=ver::{}'.format(version))
shell: python

- name: Download release
Expand All @@ -205,7 +212,6 @@ jobs:
version = re.sub('refs/\w+/', '', '${{ github.ref }}')
# Pop off the leading 'v' in the tag
if version[0] == 'v': version = version[1:]
print('::set-output name=tag::{}'.format(version))
# with open('README.md', 'r', encoding='utf8') as desc_file:
# description = desc_file.read()
with open(
Expand All @@ -229,4 +235,4 @@ jobs:
run: choco pack dist/choco/pacaptr.nuspec --verbose

- name: Push to choco repository
run: choco push pacaptr.${{ steps.ver.replace.tag }}.nupkg --source https://push.chocolatey.org --verbose
run: choco push pacaptr.${{ steps.ver.replace.ver }}.nupkg --source https://push.chocolatey.org --verbose

0 comments on commit 704da33

Please sign in to comment.