@@ -17,34 +17,34 @@ jobs:
17
17
name : Windows
18
18
steps :
19
19
- name : Checkout Repo
20
- uses : actions/checkout@v2
20
+ uses : actions/checkout@v3
21
21
- name : Setup Python
22
- uses : actions/setup-python@v2
22
+ uses : actions/setup-python@v3
23
23
with :
24
24
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
28
27
- name : Get tag
29
28
id : vars
30
29
shell : bash
31
30
run : echo ::set-output name=tag::${GITHUB_REF#refs/*/}
32
31
- name : Make binary
33
32
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
36
36
- name : Publish builds
37
- uses : actions/upload-artifact@v2
37
+ uses : actions/upload-artifact@v3
38
38
with :
39
- path : dist/lazy-dsi-file-downloader-${{ steps.vars.outputs.tag }}-Windows.exe
39
+ path : dist
40
40
name : windows
41
41
42
42
python :
43
43
runs-on : ubuntu-latest
44
44
name : Python 3 build
45
45
steps :
46
46
- name : Checkout repo
47
- uses : actions/checkout@v2
47
+ uses : actions/checkout@v3
48
48
- name : Get tag
49
49
id : vars
50
50
run : echo ::set-output name=tag::${GITHUB_REF#refs/*/}
57
57
chmod +x main.py
58
58
zip -r ../lazy-dsi-file-downloader-${{ steps.vars.outputs.tag }}-Python3.zip *
59
59
- name : Publish artifact
60
- uses : actions/upload-artifact@v2
60
+ uses : actions/upload-artifact@v3
61
61
with :
62
62
path : lazy-dsi-file-downloader-${{ steps.vars.outputs.tag }}-Python3.zip
63
63
name : python
68
68
name : macOS
69
69
steps :
70
70
- name : Checkout Repo
71
- uses : actions/checkout@v2
71
+ uses : actions/checkout@v3
72
72
- name : Setup Python
73
- uses : actions/setup-python@v2
73
+ uses : actions/setup-python@v3
74
74
with :
75
75
python-version : " 3.x"
76
76
- name : Install pyinstaller
86
86
chmod +x lazy-dsi-file-downloader-${{ steps.vars.outputs.tag }}-macOS
87
87
zip ../lazy-dsi-file-downloader-${{ steps.vars.outputs.tag }}-macOS.zip lazy-dsi-file-downloader-${{ steps.vars.outputs.tag }}-macOS
88
88
- name : Publish artifact
89
- uses : actions/upload-artifact@v2
89
+ uses : actions/upload-artifact@v3
90
90
with :
91
91
path : lazy-dsi-file-downloader-${{ steps.vars.outputs.tag }}-macOS.zip
92
92
name : macos
@@ -98,16 +98,19 @@ jobs:
98
98
needs : [windows,python,macos]
99
99
steps :
100
100
- 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
103
106
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