File tree Expand file tree Collapse file tree 1 file changed +43
-5
lines changed
Expand file tree Collapse file tree 1 file changed +43
-5
lines changed Original file line number Diff line number Diff line change 1- name : Build wheels for Windows x64
1+ name : Build/release wheels for Windows x64
22
33on :
44 workflow_dispatch :
5-
5+ inputs :
6+ custom_ref :
7+ description : ' custom ref/tag'
8+ required : false
9+ do_release :
10+ description : ' Creating release from artifacts: type "y" to enable'
11+ required : false
612jobs :
713 build-w64 :
814 runs-on :
2733 cd build
2834 cmake ..
2935 - name : Add msbuild to PATH
30- uses : microsoft/setup-msbuild@v1.1
36+ uses : microsoft/setup-msbuild@v2
3137 # with:
3238 # msbuild-architecture: x64
3339 - name : Build lzo static lib
4854 - name : Upload artifact
4955 uses : actions/upload-artifact@v4
5056 with :
51- name : wheels
52- path : dist
57+ name : ${{ github.event.repository.name }}-py${{ matrix.python-version }}
58+ path : dist\*.whl
5359 overwrite : true
5460 if-no-files-found : error
61+
62+ release :
63+ if : ${{ github.event.inputs.do_release == 'y' && github.event.inputs.custom_ref != '' }}
64+ needs : [build-w64]
65+ runs-on : ubuntu-latest
66+ permissions :
67+ contents : write
68+
69+ env :
70+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
71+
72+ steps :
73+ - name : Download artifacts
74+ uses : actions/download-artifact@v4
75+ with :
76+ path : ./artifacts
77+ merge-multiple : true
78+
79+ - name : List all files
80+ run : ls -R ./artifacts
81+
82+ - name : do release
83+ run : |
84+ gh release create '${{ github.event.inputs.custom_ref}}' \
85+ -t '${{ github.event.inputs.custom_ref}}' \
86+ --title "${{ github.event.repository.name }}-${{ github.event.inputs.custom_ref}}" \
87+ --target '${{ github.ref_name }}' \
88+ --latest=true \
89+ --generate-notes \
90+ --repo ${GITHUB_REPOSITORY}
91+ gh release upload '${{ github.event.inputs.custom_ref}}' --repo ${GITHUB_REPOSITORY} --clobber \
92+ ./artifacts/*
You can’t perform that action at this time.
0 commit comments