File tree Expand file tree Collapse file tree 2 files changed +34
-3
lines changed
Expand file tree Collapse file tree 2 files changed +34
-3
lines changed Original file line number Diff line number Diff line change 1717 uses : actions/checkout@v4
1818 - name : Setup vars
1919 id : setup-vars
20- run : grep "python" "mise.toml" | perl -pe 's/[ "]+//g' >> $GITHUB_OUTPUT
20+ run : |
21+ grep "python" "mise.toml" | perl -pe 's/[ "]+//g' >> $GITHUB_OUTPUT
22+ echo "filename=$(uname -a)" >> $GITHUB_OUTPUT
23+ - name : Set filename
24+ uses : actions/github-script@v7
25+ id : set-filename
26+ with :
27+ script : |
28+ const os = require("os");
29+ const platform = process.platform
30+ const arch = process.env.PROCESSOR_ARCHITEW6432 || process.arch;
31+ if (platform === "win32") {
32+ return `fontsplitta-${platform}-${arch}.zip`;
33+ } else {
34+ return `fontsplitta-${platform}-${arch}.tar.gz`;
35+ }
36+ result-encoding : string
37+ - name : Set type
38+ id : set-type
39+ run : |
40+ if [[ "${ matrix.os }" == "windows-latest" ]]; then
41+ echo "result=zip" >> $GITHUB_OUTPUT
42+ else
43+ echo "result=tar" >> $GITHUB_OUTPUT
44+ fi
2145 - name : Setup Python
2246 uses : actions/setup-python@v2
2347 with :
@@ -30,11 +54,16 @@ jobs:
3054 - name : Build executable
3155 run : |
3256 poetry run pyinstaller --onefile --clean --name "fontsplitta" "fontsplitta/__main__.py"
57+ - name : Archive Release
58+ uses : thedoctor0/zip-release
59+ with :
60+ directory : " dist"
61+ type : ${{ steps.set-type.outputs.result }}
62+ filename : ${{ steps.set-filename.outputs.result }}
3363 - name : Release
3464 uses : softprops/action-gh-release@v2
3565 with :
36- files : |
37- dist/fontsplitta
66+ files : ${{ steps.set-filename.outputs.result }}
3867 release-python :
3968 runs-on : ubuntu-latest
4069 env :
Original file line number Diff line number Diff line change 11{
22 "cSpell.words" : [
3+ " ARCHITEW" ,
34 " Fontsplitta" ,
45 " fonttools" ,
56 " KHTML" ,
1011 " setuptools" ,
1112 " shunirr" ,
1213 " softprops" ,
14+ " thedoctor" ,
1315 " unicodes" ,
1416 " urllib"
1517 ]
You can’t perform that action at this time.
0 commit comments