1
1
name : PyStand
2
2
3
- on : [ push, pull_request ]
3
+ on :
4
+ push :
5
+ pull_request :
6
+ types : [ opened, synchronize, reopened, ready_for_review ]
4
7
5
8
env :
6
- PYSTAND_VERSION : v1.0.6
7
9
BUILD_TYPE : Release
8
10
9
11
jobs :
10
12
build-msvc :
11
13
if : >-
12
- ! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
13
14
github.event.pull_request.draft == false
14
15
15
16
runs-on : windows-latest
16
17
17
18
strategy :
18
19
fail-fast : false
19
20
matrix :
21
+ arch : [ Win32, x64 ]
22
+ subsystem : [ GUI, CLI ]
20
23
include :
21
- - { generator: Visual Studio 17 2022, arch: Win32, subsystem: GUI }
22
- - { generator: Visual Studio 17 2022, arch: Win32, subsystem: CLI }
23
- - { generator: Visual Studio 17 2022, arch: x64, subsystem: GUI }
24
- - { generator: Visual Studio 17 2022, arch: x64, subsystem: CLI }
24
+ - generator : Visual Studio 17 2022
25
25
26
26
steps :
27
27
- name : Checkout
@@ -42,32 +42,28 @@ jobs:
42
42
- name : Upload artifacts
43
43
uses : actions/upload-artifact@v3
44
44
with :
45
- name : PyStand-${{ env.PYSTAND_VERSION }}-${{ matrix.arch }}-${{ matrix.subsystem }}
45
+ name : PyStand-${{ matrix.arch }}-${{ matrix.subsystem }}
46
46
path : build/${{ env.BUILD_TYPE }}
47
47
48
48
build-gcc :
49
49
if : >-
50
- ! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
51
50
github.event.pull_request.draft == false
52
51
53
52
runs-on : windows-latest
54
53
55
54
strategy :
56
55
fail-fast : false
57
56
matrix :
58
- include :
59
- - { sys: mingw32, arch: i686, subsystem: GUI }
60
- - { sys: mingw32, arch: i686, subsystem: CLI }
61
- - { sys: mingw64, arch: x86_64, subsystem: GUI }
62
- - { sys: mingw64, arch: x86_64, subsystem: CLI }
57
+ sys : [ mingw32, mingw64 ]
58
+ subsystem : [ GUI, CLI ]
63
59
64
60
steps :
65
61
- name : Checkout
66
62
uses : actions/checkout@v3
67
63
68
- - name : Setup MinGW-w64
64
+ - name : Setup WinLibs
69
65
run : |
70
- if ( '${{ matrix.arch }}' -eq 'i686 ' )
66
+ if ( '${{ matrix.sys }}' -eq 'mingw32 ' )
71
67
{
72
68
Invoke-WebRequest -Uri https://github.com/brechtsanders/winlibs_mingw/releases/download/7.5.0-7.0.0-r1/winlibs-i686-posix-dwarf-gcc-7.5.0-mingw-w64-7.0.0-r1.7z -OutFile ${{ matrix.sys }}.7z
73
69
}
@@ -93,14 +89,16 @@ jobs:
93
89
- name : Upload artifacts
94
90
uses : actions/upload-artifact@v3
95
91
with :
96
- name : PyStand-${{ env.PYSTAND_VERSION }}-${{ matrix.sys }}-${{ matrix.subsystem }}
92
+ name : PyStand-${{ matrix.sys }}-${{ matrix.subsystem }}
97
93
path : build\PyStand.exe
98
94
99
95
release :
100
- needs : [ build-msvc, build-gcc ]
96
+ if : startsWith(github.ref, 'refs/tags/')
101
97
102
98
runs-on : windows-latest
103
99
100
+ needs : [ build-msvc, build-gcc ]
101
+
104
102
steps :
105
103
- name : Download artifacts
106
104
uses : actions/download-artifact@v3
@@ -109,19 +107,21 @@ jobs:
109
107
run : ls -R
110
108
111
109
- name : Create archives
112
- run : |
113
- 7z a PyStand-${{ env.PYSTAND_VERSION }}-Win32-CLI.zip .\PyStand-${{ env.PYSTAND_VERSION }}-Win32-CLI\*
114
- 7z a PyStand-${{ env.PYSTAND_VERSION }}-Win32-GUI.zip .\PyStand-${{ env.PYSTAND_VERSION }}-Win32-GUI\*
115
- 7z a PyStand-${{ env.PYSTAND_VERSION }}-x64-CLI.zip .\PyStand-${{ env.PYSTAND_VERSION }}-x64-CLI\*
116
- 7z a PyStand-${{ env.PYSTAND_VERSION }}-x64-GUI.zip .\PyStand-${{ env.PYSTAND_VERSION }}-x64-GUI\*
117
- 7z a PyStand-${{ env.PYSTAND_VERSION }}-mingw32-CLI.zip .\PyStand-${{ env.PYSTAND_VERSION }}-mingw32-CLI\*
118
- 7z a PyStand-${{ env.PYSTAND_VERSION }}-mingw32-GUI.zip .\PyStand-${{ env.PYSTAND_VERSION }}-mingw32-GUI\*
119
- 7z a PyStand-${{ env.PYSTAND_VERSION }}-mingw64-CLI.zip .\PyStand-${{ env.PYSTAND_VERSION }}-mingw64-CLI\*
120
- 7z a PyStand-${{ env.PYSTAND_VERSION }}-mingw64-GUI.zip .\PyStand-${{ env.PYSTAND_VERSION }}-mingw64-GUI\*
110
+ run : >
111
+ 7z
112
+ a
113
+ PyStand-v${{ github.ref_name }}-exe.zip
114
+ PyStand-Win32-CLI
115
+ PyStand-Win32-GUI
116
+ PyStand-x64-CLI
117
+ PyStand-x64-GUI
118
+ PyStand-mingw32-CLI
119
+ PyStand-mingw32-GUI
120
+ PyStand-mingw64-CLI
121
+ PyStand-mingw64-GUI
121
122
122
123
- name : Release
123
124
uses : softprops/action-gh-release@v1
124
- if : startsWith(github.ref, 'refs/tags/')
125
125
env :
126
126
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
127
127
with :
0 commit comments