@@ -12,11 +12,13 @@ jobs:
12
12
build-linux :
13
13
name : Build Linux
14
14
runs-on : ubuntu-latest
15
+ permissions :
16
+ contents : write
15
17
strategy :
16
18
matrix :
17
19
cxx : [g++-10, clang++-12]
18
20
steps :
19
- - uses : actions/checkout@v1
21
+ - uses : actions/checkout@v2
20
22
- name : apt update
21
23
run : sudo apt-get -o Acquire::Retries=3 update
22
24
- name : install opengl
@@ -42,16 +44,34 @@ jobs:
42
44
- name : install files
43
45
run : make -C _build install
44
46
- name : upload build artifacts
47
+ if : github.ref == 'refs/heads/master'
45
48
uses : actions/upload-artifact@v1
46
49
with :
47
50
name : Linux TreeSheets ${{ matrix.cxx }}
48
51
path : TreeSheets-relocatable
52
+ - name : zip
53
+ if : github.ref == 'refs/heads/master'
54
+ uses : vimtor/action-zip@v1
55
+ with :
56
+ files : TreeSheets-relocatable/
57
+ dest : linux_treesheets_${{ matrix.cxx }}.zip
58
+ - name : Create release
59
+ if : github.ref == 'refs/heads/master'
60
+ uses : ncipollo/release-action@v1
61
+ with :
62
+ tag : ${{ github.run_id }}
63
+ allowUpdates : true
64
+ omitBody : true
65
+ commit : master
66
+ artifacts : " linux_treesheets_${{ matrix.cxx }}.zip"
49
67
50
68
build-windows :
51
69
name : Build Windows
52
70
runs-on : windows-2022
71
+ permissions :
72
+ contents : write
53
73
steps :
54
- - uses : actions/checkout@v1
74
+ - uses : actions/checkout@v2
55
75
- name : Add msbuild to PATH
56
76
uses : microsoft/setup-msbuild@v1.0.3
57
77
- name : clone wxWidgets
@@ -78,16 +98,28 @@ jobs:
78
98
script-file : " TS_installer.nsi"
79
99
arguments : " /V3"
80
100
- name : upload build artifacts
101
+ if : github.ref == 'refs/heads/master'
81
102
uses : actions/upload-artifact@v1
82
103
with :
83
104
name : Windows TreeSheets (installer)
84
105
path : Treesheets_Setup.exe
106
+ - name : Create release
107
+ if : github.ref == 'refs/heads/master'
108
+ uses : ncipollo/release-action@v1
109
+ with :
110
+ tag : ${{ github.run_id }}
111
+ allowUpdates : true
112
+ omitBody : true
113
+ commit : master
114
+ artifacts : " Treesheets_Setup.exe"
85
115
86
116
build-mac :
87
117
name : Build Mac
88
118
runs-on : macos-latest
119
+ permissions :
120
+ contents : write
89
121
steps :
90
- - uses : actions/checkout@v1
122
+ - uses : actions/checkout@v2
91
123
- name : clone wxWidgets
92
124
run : git clone --depth 1 --recurse-submodules https://github.com/wxWidgets/wxWidgets
93
125
- name : build wxWidgets
@@ -110,7 +142,23 @@ jobs:
110
142
chmod +x build/Build/Products/Release/TreeSheets.app/Contents/MacOS/TreeSheets
111
143
rm -rf build/Build/Products/Release/TreeSheets.app.dSYM
112
144
- name : upload build artifacts
145
+ if : github.ref == 'refs/heads/master'
113
146
uses : actions/upload-artifact@v2
114
147
with :
115
148
name : Mac TreeSheets
116
149
path : osx/TreeSheets/build/Build/Products/Release
150
+ - name : zip
151
+ if : github.ref == 'refs/heads/master'
152
+ uses : vimtor/action-zip@v1
153
+ with :
154
+ files : osx/TreeSheets/build/Build/Products/Release/
155
+ dest : mac_treesheets.zip
156
+ - name : Create release
157
+ if : github.ref == 'refs/heads/master'
158
+ uses : ncipollo/release-action@v1
159
+ with :
160
+ tag : ${{ github.run_id }}
161
+ allowUpdates : true
162
+ omitBody : true
163
+ commit : master
164
+ artifacts : " mac_treesheets.zip"
0 commit comments