@@ -17,34 +17,34 @@ jobs:
1717 name : Windows
1818 steps :
1919 - name : Checkout Repo
20- uses : actions/checkout@v2
20+ uses : actions/checkout@v3
2121 - name : Setup Python
22- uses : actions/setup-python@v2
22+ uses : actions/setup-python@v3
2323 with :
2424 python-version : " 3.8.x"
25- - name : Install pyinstaller
26- run : |
27- pip3 install certifi pyinstaller
25+ - name : Install cx_Freeze
26+ run : py -m pip install cx_Freeze
2827 - name : Get tag
2928 id : vars
3029 shell : bash
3130 run : echo ::set-output name=tag::${GITHUB_REF#refs/*/}
3231 - name : Make binary
3332 run : |
34- pyinstaller --onefile --add-data "certifi;certifi" --add-data "requests;requests" --add-data "urllib3;urllib3" --add-data "lazy.ico;." --add-data "chardet;chardet" --icon "lazy.ico" --console --name "lazy-dsi-file-downloader-${{ steps.vars.outputs.tag }}-Windows" main.py
35- cd dist
33+ py cxfreeze_setup.py build
34+ mv dist/main.exe dist/lazy-dsi-file-downloader-${{ steps.vars.outputs.tag }}-Windows.exe
35+ shell : bash
3636 - name : Publish builds
37- uses : actions/upload-artifact@v2
37+ uses : actions/upload-artifact@v3
3838 with :
39- path : dist/lazy-dsi-file-downloader-${{ steps.vars.outputs.tag }}-Windows.exe
39+ path : dist
4040 name : windows
4141
4242 python :
4343 runs-on : ubuntu-latest
4444 name : Python 3 build
4545 steps :
4646 - name : Checkout repo
47- uses : actions/checkout@v2
47+ uses : actions/checkout@v3
4848 - name : Get tag
4949 id : vars
5050 run : echo ::set-output name=tag::${GITHUB_REF#refs/*/}
5757 chmod +x main.py
5858 zip -r ../lazy-dsi-file-downloader-${{ steps.vars.outputs.tag }}-Python3.zip *
5959 - name : Publish artifact
60- uses : actions/upload-artifact@v2
60+ uses : actions/upload-artifact@v3
6161 with :
6262 path : lazy-dsi-file-downloader-${{ steps.vars.outputs.tag }}-Python3.zip
6363 name : python
6868 name : macOS
6969 steps :
7070 - name : Checkout Repo
71- uses : actions/checkout@v2
71+ uses : actions/checkout@v3
7272 - name : Setup Python
73- uses : actions/setup-python@v2
73+ uses : actions/setup-python@v3
7474 with :
7575 python-version : " 3.x"
7676 - name : Install pyinstaller
8686 chmod +x lazy-dsi-file-downloader-${{ steps.vars.outputs.tag }}-macOS
8787 zip ../lazy-dsi-file-downloader-${{ steps.vars.outputs.tag }}-macOS.zip lazy-dsi-file-downloader-${{ steps.vars.outputs.tag }}-macOS
8888 - name : Publish artifact
89- uses : actions/upload-artifact@v2
89+ uses : actions/upload-artifact@v3
9090 with :
9191 path : lazy-dsi-file-downloader-${{ steps.vars.outputs.tag }}-macOS.zip
9292 name : macos
@@ -98,16 +98,19 @@ jobs:
9898 needs : [windows,python,macos]
9999 steps :
100100 - name : Download artifacts
101- uses : actions/download-artifact@v2
102- - name : Upload to Release
101+ uses : actions/download-artifact@v3
102+ - name : Get tag
103+ id : vars
104+ run : echo ::set-output name=tag::${GITHUB_REF#refs/*/}
105+ - name : re-zip Windows
103106 run : |
104- ID=$(jq --raw-output '.release.id' $GITHUB_EVENT_PATH)
105-
106- for file in ${{ github.workspace }}/*/*; do
107- AUTH_HEADER="Authorization: token ${{ secrets.GITHUB_TOKEN }}"
108- CONTENT_LENGTH="Content-Length: $(stat -c%s $file)"
109- CONTENT_TYPE="Content-Type: application/octet-stream"
110- UPLOAD_URL="https://uploads.github.com/repos/${{ github.repository }}/releases/$ID/assets?name=$(basename $file)"
111- curl -XPOST -H "$AUTH_HEADER" -H "$CONTENT_LENGTH" -H "$CONTENT_TYPE" --upload-file "$file" "$UPLOAD_URL"
112- done
113-
107+ cd windows
108+ zip -r lazy-dsi-file-downloader-${{ steps.vars.outputs.tag }}-Windows.zip *
109+ cd ..
110+ - name : Release
111+ uses : softprops/action-gh-release@v1
112+ with :
113+ files : |
114+ windows/lazy-dsi-file-downloader-${{ steps.vars.outputs.tag }}-Windows.zip
115+ macos/lazy-dsi-file-downloader-${{ steps.vars.outputs.tag }}-macOS.zip
116+ python/lazy-dsi-file-downloader-${{ steps.vars.outputs.tag }}-Python3.zip
0 commit comments