File tree 1 file changed +23
-4
lines changed
1 file changed +23
-4
lines changed Original file line number Diff line number Diff line change 1
- # on:
2
- # release:
3
- # types: [published]
4
- on : workflow_dispatch
1
+ on :
2
+ release :
3
+ types : [published]
4
+ workflow_dispatch :
5
5
6
6
jobs :
7
7
build :
@@ -11,20 +11,39 @@ jobs:
11
11
runs-on : ${{ matrix.os }}
12
12
steps :
13
13
- uses : actions/checkout@v4
14
+
14
15
- name : Set up Python
15
16
uses : actions/setup-python@v4
16
17
with :
17
18
python-version : ' 3.10'
19
+
18
20
- name : install dependencies and Pyinstaller
19
21
run : |
20
22
python -m pip install --upgrade pip
21
23
pip install -r requirements.txt
22
24
pip install pyinstaller
25
+
23
26
- name : build the executable file
24
27
run : |
25
28
pyinstaller --noconsole --onefile ./pyJSON.py
29
+
26
30
- name : create artifacts
27
31
uses : actions/upload-artifact@v4
28
32
with :
29
33
name : pyJSON-${{ matrix.os }}
30
34
path : ./dist/*
35
+
36
+ - name : pack data for release
37
+ if : github.event_name == "release"
38
+ run : |
39
+ tag=$(git describe --tags --abbrev=0)
40
+ release_name="pyJSON-$tag-${{ matrix.os }}"
41
+ 7z a -tzip "${release_name}.zip" "./dist/*"
42
+
43
+ - name : add to release
44
+ if : github.event_name == "release"
45
+ uses : softprops/action-gh-release@v2
46
+ with :
47
+ files : pyJSON-*.zip
48
+ env :
49
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments