-
Notifications
You must be signed in to change notification settings - Fork 0
160 lines (155 loc) · 5.37 KB
/
latest_build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
name: Release latest build
on:
workflow_dispatch:
jobs:
create-release:
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create-release-step.outputs.upload_url }}
steps:
- name: Make release
id: "create-release-step"
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: false
title: "Latest build"
package-linux:
needs: create-release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build Linux
uses: ilesinge/FyneBuildActions/linux@v1
- name: Rename files
run: |
mv Samples4web.tar.xz Samples4web-linux.tar.xz
mv samples4web samples4web-linux
- name: Upload package
uses: actions/upload-artifact@v2
with:
name: 'Samples4web-linux.tar.xz'
path: '.'
- name: Upload package
uses: actions/upload-artifact@v2
with:
name: 'samples4web-linux'
path: '.'
- name: Add to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: ./Samples4web-linux.tar.xz
asset_name: Samples4web-linux.tar.xz
asset_content_type: application/x-tar
- name: Add to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: ./samples4web-linux
asset_name: samples4web-linux
asset_content_type: application/octet-stream
package-windows:
needs: create-release
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Build Windows
uses: ilesinge/FyneBuildActions/windows@v1
- name: Copy exe file
run: cp Samples4web.exe Samples4web-windows.exe
- name: Upload package
uses: actions/upload-artifact@v2
with:
name: 'Samples4web-windows.exe'
path: '.'
- name: Install go-msi
run: choco install -y "go-msi"
- name: Prepare MSI step folder structure
run: |
mkdir application
cp Samples4web.exe application/Samples4web.exe
cp LICENSE application/LICENSE
cp Icon.ico application/Icon.ico
- name: Build Windows Installer MSI from exe file
uses: AliceOh/CreateWindowsInstaller@1.0.0
with:
exefile: 'Samples4web.exe'
- name: Rename MSI file
run: ren Samples4web.exe.msi Samples4web-windows.msi
- name: Upload package
uses: actions/upload-artifact@v2
with:
name: 'Samples4web-windows.msi'
path: '.'
- name: Add to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: ./Samples4web-windows.exe
asset_name: Samples4web-windows.exe
asset_content_type: application/octet-stream
- name: Add to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: ./Samples4web-windows.msi
asset_name: Samples4web-windows.msi
asset_content_type: application/octet-stream
package-mac:
needs: create-release
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Build MacOS version
uses: ilesinge/FyneBuildActions/macos@v1
- name: Install create-dmg
run: npm install --global create-dmg
- name: Create DMG
continue-on-error: true
run: create-dmg Samples4web.app
- name: Rename DMG
run: mv "Samples4web 1.0.0.dmg" Samples4web-mac.dmg
- name: Zip Release
uses: TheDoctor0/zip-release@main
with:
type: 'zip'
filename: 'Samples4web-mac.zip'
path: 'Samples4web.app'
- name: Upload package
uses: actions/upload-artifact@v2
with:
name: 'Samples4web-mac.zip'
path: '.'
- name: Upload DMG
uses: actions/upload-artifact@v2
with:
name: 'Samples4web-mac.dmg'
path: '.'
- name: Add to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: ./Samples4web-mac.zip
asset_name: Samples4web-mac.zip
asset_content_type: application/zip
- name: Add to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: ./Samples4web-mac.dmg
asset_name: Samples4web-mac.dmg
asset_content_type: application/octet-stream