File tree Expand file tree Collapse file tree 2 files changed +32
-3
lines changed
Expand file tree Collapse file tree 2 files changed +32
-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+ - uses : actions/github-script@v7
24+ id : set-filename
25+ with :
26+ script : |
27+ const os = require("os");
28+ const platform = process.platform
29+ const arch = process.env.PROCESSOR_ARCHITEW6432 || process.arch;
30+ if (platform === "win32") {
31+ return `fontsplitta-${platform}-${arch}.zip`;
32+ } else {
33+ return `fontsplitta-${platform}-${arch}.tar.gz`;
34+ }
35+ result-encoding : string
36+ - id : set-type
37+ run : |
38+ if [[ "${ matrix.os }" == "windows-latest" ]]; then
39+ echo "result=zip" >> $GITHUB_OUTPUT
40+ else
41+ echo "result=tar" >> $GITHUB_OUTPUT
42+ fi
2143 - name : Setup Python
2244 uses : actions/setup-python@v2
2345 with :
@@ -30,11 +52,16 @@ jobs:
3052 - name : Build executable
3153 run : |
3254 poetry run pyinstaller --onefile --clean --name "fontsplitta" "fontsplitta/__main__.py"
55+ - name : Archive Release
56+ uses : thedoctor0/zip-release
57+ with :
58+ directory : " dist"
59+ type : ${{ steps.set-type.outputs.result }}
60+ filename : ${{ steps.set-filename.outputs.result }}
3361 - name : Release
3462 uses : softprops/action-gh-release@v2
3563 with :
36- files : |
37- dist/fontsplitta
64+ files : ${{ steps.set-filename.outputs.result }}
3865 release-python :
3966 runs-on : ubuntu-latest
4067 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