-
Notifications
You must be signed in to change notification settings - Fork 2
116 lines (101 loc) · 2.94 KB
/
release.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
name: Release
# Controls when the action will run.
on:
push:
tags:
- '6502-v[0-9]+.[0-9]+*'
jobs:
ubuntu:
runs-on: ubuntu-latest
name: Build on Ubuntu
strategy:
fail-fast: false
matrix:
compiler: [ clang ]
steps:
- name: Install Dependencies
run: |
sudo apt-get install libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev
- uses: actions/[email protected]
- name: build
env:
CC: ${{ matrix.compiler }}
run: |
cmake -DCMAKE_BUILD_TYPE=Release -B build/release
cmake --build build/release --config Release
mkdir build/release/bin/resources
cp -r resources/* build/release/bin/resources
- uses: actions/upload-artifact@v2
with:
name: linux-bin
path: ./build/release/bin
macos:
runs-on: macos-latest
name: Build on Mac OS
strategy:
fail-fast: false
matrix:
compiler: [ clang ]
steps:
- uses: actions/[email protected]
- name: build
env:
CC: ${{ matrix.compiler }}
run: |
cmake -DCMAKE_BUILD_TYPE=Release -B build/release
cmake --build build/release --config Release
mkdir build/release/bin/resources
cp -r resources/* build/release/bin/resources
- uses: actions/upload-artifact@v2
with:
name: mac-bin
path: ./build/release/bin
windows:
runs-on: windows-latest
name: Build on Windows
steps:
- uses: actions/[email protected]
- name: build
run: |
cmake -DCMAKE_BUILD_TYPE=Release -B build/release
cmake --build build/release --config Release
mkdir build\release\bin\Release\resources
xcopy /E /I resources build\release\bin\Release\resources
- uses: actions/upload-artifact@v2
with:
name: windows-bin
path: ./build/release/bin
release:
runs-on: ubuntu-latest
name: Download artifacts
needs: [ubuntu, macos, windows]
steps:
- name: Download linux
uses: actions/download-artifact@v2
with:
name: linux-bin
path: linux-bin
- name: Download mac
uses: actions/download-artifact@v2
with:
name: mac-bin
path: mac-bin
- name: Download windows
uses: actions/download-artifact@v2
with:
name: windows-bin
path: windows-bin
- name: Display structure of downloaded files
run: ls -R
- name: Zip files
run: |
zip -r 6502-linux.zip linux-bin/
zip -r 6502-mac.zip mac-bin/
zip -r 6502-windows.zip windows-bin/
- name: Release to GiHub
uses: softprops/action-gh-release@v1
with:
files: "*.zip"
draft: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}