-
Notifications
You must be signed in to change notification settings - Fork 56
141 lines (115 loc) · 4.61 KB
/
build.yml
File metadata and controls
141 lines (115 loc) · 4.61 KB
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
name: build
# execute this workflow automatically, but only when pushing to master
on:
push:
branches: [ master ]
# pull_request:
# branches: [ master ]
jobs:
linux:
runs-on: ubuntu-latest
# container: debian:buster-slim
steps:
- uses: actions/checkout@v2
- name: Execute script to build linux AppImage
run: "build/linux/buildAppImage.sh"
shell: bash
- uses: actions/upload-artifact@v2
with:
name: helloWorld-linux-x86_64
path: dist/
- name: Create dist tarball
run: 'tar -cjvf helloWorld-linux-x86_64.${{ github.run_id }}.tar.bz2 dist/*'
shell: bash
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.run_id }}_linux
release_name: 'Public Build Artifact: Linux ${{ github.run_id }}'
draft: false
prerelease: true
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: helloWorld-linux-x86_64.${{ github.run_id }}.tar.bz2
asset_name: helloWorld-linux-x86_64.${{ github.run_id }}.tar.bz2
asset_content_type: application/x-bzip2
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Execute script to .exe in Windows
run: "build/windows/buildExe.ps1"
shell: powershell -Command "& '{0}'"
- uses: actions/upload-artifact@v2
with:
name: Windows executable (x86_64)
path: dist/
- uses: actions/upload-artifact@v2
with:
name: helloWorld-windows-x86_64
path: dist/
- name: Create Release .zip
run: 'Compress-Archive -DestinationPath helloWorld-windows-x86_64.${{ github.run_id }}.zip -Path dist\*'
shell: powershell
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.run_id }}_windows
release_name: 'Public Build Artifact: Windows ${{ github.run_id }}'
draft: false
prerelease: true
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: helloWorld-windows-x86_64.${{ github.run_id }}.zip
asset_name: helloWorld-windows-x86_64.${{ github.run_id }}.zip
asset_content_type: application/zip
mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Execute script to build MacOS .dmg file
run: "build/mac/buildDmg.sh"
shell: bash
- uses: actions/upload-artifact@v2
with:
name: helloWorld-mac-x86_64
path: dist/
- name: Create dist tarball
run: 'tar -cjvf helloWorld-mac-x86_64.${{ github.run_id }}.tar.bz2 dist/*'
shell: bash
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.run_id }}_mac
release_name: 'Public Build Artifact: Mac ${{ github.run_id }}'
draft: false
prerelease: true
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: helloWorld-mac-x86_64.${{ github.run_id }}.tar.bz2
asset_name: helloWorld-mac-x86_64.${{ github.run_id }}.tar.bz2
asset_content_type: application/x-bzip2