-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (66 loc) · 1.74 KB
/
release.yaml
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
name: Build and Release
on:
push:
tags:
- 'v*.*.*' # Trigger on version tags
jobs:
build-windows:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up CMake
uses: lukka/get-cmake@v2
- name: Configure CMake
run: cmake -B build -S . -A x64
- name: Build
run: cmake --build build --config Release
- name: Create artifact
uses: actions/upload-artifact@v2
with:
name: windows-executable
path: build/Release/Chip8Emu.exe
build-macos:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up CMake
uses: lukka/get-cmake@v2
- name: Configure CMake
run: cmake -B build -S .
- name: Build
run: cmake --build build --config Release
- name: Create artifact
uses: actions/upload-artifact@v2
with:
name: macos-executable
path: build/Chip8Emu
release:
runs-on: ubuntu-latest
needs: [build-windows, build-macos]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Download Windows artifact
uses: actions/download-artifact@v2
with:
name: windows-executable
path: ./release
- name: Download macOS artifact
uses: actions/download-artifact@v2
with:
name: macos-executable
path: ./release
- name: Create release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
files: |
release/Chip8Emu.exe
release/Chip8Emu