Skip to content

Commit cb6bfb7

Browse files
committed
build: test choco too
1 parent 50f61cf commit cb6bfb7

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/publish-release-packages.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ on:
77
required: true
88
type: string
99
description: "The github artifact holding the wheel file which will be published"
10+
do_brew:
11+
required: false
12+
default: true
13+
type: boolean
14+
description: "Publish to brew repository"
15+
do_chocolatey:
16+
required: false
17+
default: true
18+
type: boolean
19+
description: "Publish to Chocolatey repository"
1020
workflow_dispatch:
1121
inputs:
1222
release:
@@ -18,6 +28,11 @@ on:
1828
default: true
1929
type: boolean
2030
description: "Publish to brew repository"
31+
do_chocolatey:
32+
required: false
33+
default: true
34+
type: boolean
35+
description: "Publish to Chocolatey repository"
2136

2237
jobs:
2338
publish-brew:
@@ -33,6 +48,7 @@ jobs:
3348
run: gh release download ${{ inputs.release }} --pattern "*.whl" --dir dist
3449
env:
3550
GH_TOKEN: ${{ github.token }}
51+
3652
- name: Download artifact
3753
if: ${{ github.event_name == 'workflow_call' }}
3854
uses: actions/download-artifact@v3
@@ -47,3 +63,24 @@ jobs:
4763
run: scripts/update-brew-formula.sh "dist/helloworld-*-py3-none-any.whl" "daniel-makerx/homebrew-tap"
4864
env:
4965
TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }}
66+
67+
publish-chocolatey:
68+
runs-on: windows-latest
69+
if: ${{ inputs.do_chocolatey }}
70+
steps:
71+
- name: Checkout source code
72+
uses: actions/checkout@v3
73+
74+
# Download either via release or provided artifact
75+
- name: Download release
76+
if: ${{ github.event_name == 'workflow_dispatch' }}
77+
run: gh release download ${{ inputs.release }} --pattern "*.whl" --dir dist
78+
env:
79+
GH_TOKEN: ${{ github.token }}
80+
81+
- name: Download artifact
82+
if: ${{ github.event_name == 'workflow_call' }}
83+
uses: actions/download-artifact@v3
84+
with:
85+
name: ${{ inputs.artifactName }}
86+
path: dist

0 commit comments

Comments
 (0)