9
9
jobs :
10
10
build :
11
11
runs-on : ${{ matrix.os }}
12
+ permissions :
13
+ contents : write
12
14
strategy :
13
15
fail-fast : false
14
16
matrix :
@@ -29,95 +31,45 @@ jobs:
29
31
steps :
30
32
- uses : spatial-model-editor/setup-ci@v1
31
33
- uses : actions/checkout@v4
32
- - name : Build script
33
- run : ./build.sh
34
- - uses : actions/upload-artifact@v4
35
- with :
36
- name : artifacts-${{ matrix.os }}
37
- path : ./artefacts/*
38
- retention-days : 3
39
-
40
- win32-mingw :
41
- name : Windows 32-bit Mingw
42
- runs-on : windows-2022
43
- env :
44
- INSTALL_PREFIX : " /c/smelibs"
45
- SUDO_CMD : " "
46
- CONFIGURE_EXTRAS : " -DQT_QMAKE_TARGET_MKSPEC=win32-g++"
47
- OS : " win32-mingw"
48
- defaults :
49
- run :
50
- shell : msys2 {0}
51
- steps :
52
- - uses : actions/checkout@v4
53
- - uses : msys2/setup-msys2@v2
54
- with :
55
- msystem : MINGW32
56
- update : true
57
- install : mingw-w64-i686-gcc mingw-w64-i686-cmake mingw-w64-i686-ninja git
58
- - name : Build script
59
- run : ./build.sh
60
- - uses : actions/upload-artifact@v4
61
- with :
62
- name : artifacts-win32-mingw
63
- path : ./artefacts/*
64
-
65
- win64-msvc :
66
- name : Windows 64-bit MSVC
67
- runs-on : windows-2022
68
- env :
69
- INSTALL_PREFIX : ' C:\smelibs'
70
- OS : " win64-msvc"
71
- steps :
72
- - uses : actions/checkout@v4
73
- - uses : ilammy/msvc-dev-cmd@v1
74
- with :
75
- arch : amd64
76
- toolset : 14.0
77
- - name : Build script
78
- run : ./build.ps1
79
- - uses : actions/upload-artifact@v4
34
+ - run : ./build.sh
35
+ - name : Upload binaries to release if commit is tagged
36
+ if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
37
+ uses : svenstaro/upload-release-action@v2
80
38
with :
81
- name : artifacts-win64-msvc
82
- path : ./artefacts/*
39
+ repo_token : ${{ secrets.GITHUB_TOKEN }}
40
+ file : ./artefacts/*
41
+ tag : ${{ github.ref }}
42
+ overwrite : true
43
+ file_glob : true
83
44
84
- win32-msvc :
85
- name : Windows 32-bit MSVC
45
+ msvc :
86
46
runs-on : windows-2022
47
+ permissions :
48
+ contents : write
49
+ strategy :
50
+ fail-fast : false
51
+ matrix :
52
+ include :
53
+ - os : " win64-msvc"
54
+ arch : " amd64"
55
+ - os : " win32-msvc"
56
+ arch : " amd64_x86"
87
57
env :
88
58
INSTALL_PREFIX : ' C:\smelibs'
89
- OS : " win32-msvc "
59
+ OS : ${{ matrix.os }}
90
60
steps :
91
61
- uses : actions/checkout@v4
92
62
- uses : ilammy/msvc-dev-cmd@v1
93
63
with :
94
- arch : amd64_x86
64
+ arch : ${{ matrix.arch }}
95
65
toolset : 14.0
96
- - name : Build script
97
- run : ./build.ps1
98
- - uses : actions/upload-artifact@v4
99
- with :
100
- name : artifacts-win32-msvc
101
- path : ./artefacts/*
102
-
103
- release :
104
- needs : [build, win32-mingw, win64-msvc, win32-msvc]
105
- runs-on : ubuntu-latest
106
- permissions :
107
- contents : write
108
- # upload binaries to github release if commit is tagged
109
- if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
110
- steps :
111
- - uses : actions/download-artifact@v4
112
- with :
113
- pattern : artifacts-*
114
- merge-multiple : true
115
- path : binaries
116
- - name : Upload binaries to release
66
+ - run : ./build.ps1
67
+ - name : Upload binaries to release if commit is tagged
68
+ if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
117
69
uses : svenstaro/upload-release-action@v2
118
70
with :
119
71
repo_token : ${{ secrets.GITHUB_TOKEN }}
120
- file : binaries /*
72
+ file : ./artefacts /*
121
73
tag : ${{ github.ref }}
122
74
overwrite : true
123
75
file_glob : true
0 commit comments