-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(choco): build choco package when release is created
- Loading branch information
1 parent
b9d75a2
commit fe2069a
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
on: | ||
release: | ||
types: [published] | ||
|
||
name: choco | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: download | ||
run: | | ||
${{ github.event.release }} | jq '.assets[] | select(.name=="gitviz_windows_amd64.exe").browser_download_url' | xargs curl -O --output-dir dist | ||
- name: hash | ||
run: | | ||
shasum -a 256 dist/gitviz_windows_amd64.exe | head -c 40 >> ./choco/tools/LICENSE.txt | ||
- id: version | ||
run: echo "::set-output name=version::$($env:GITHUB_REF.Substring(11))" | ||
|
||
- name: choco pack | ||
uses: crazy-max/ghaction-chocolatey@v1 | ||
with: | ||
args: pack ./choco/gitviz.nuspec --version ${{ steps.version.outputs.version }} | ||
|
||
- name: choco push | ||
uses: crazy-max/ghaction-chocolatey@v1 | ||
with: | ||
args: push --api-key=${{ secrets.CHOCOLATEY_APIKEY }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters