-
Notifications
You must be signed in to change notification settings - Fork 5
77 lines (73 loc) · 2.48 KB
/
build_artifacts.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
name: Compile Debug and Release OpenLRR
on:
push:
paths:
- src/openlrr/**
- resources/**
tags: 'v*'
branches: '**'
jobs:
Nightly_release_build:
runs-on: windows-latest
steps:
- name: Clone repo
uses: actions/checkout@v3
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1
- name: Build OpenLRR for x86 Release
run: msbuild openlrr.sln /t:openlrr /p:Configuration=Release /p:Platform=x86
- name: Rerrange files to easily use OpenLRR
run: |
mkdir OpenLRR/OpenLRR/
Move-Item bin/openlrr.dll OpenLRR/OpenLRR/
Move-Item OpenLRR.exe OpenLRR/OpenLRR/
Move-Item data/* OpenLRR/OpenLRR/
- name: Upload OpenLRR Release build
uses: actions/upload-artifact@v3
with:
name: OpenLRR-Release
path: |
OpenLRR/
Nightly_debug_build:
runs-on: windows-latest
steps:
- name: Clone repo
uses: actions/checkout@v3
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1
- name: Build OpenLRR for x86 Debug
run: msbuild openlrr.sln /t:openlrr /p:Configuration=Debug /p:Platform=x86
- name: Rerrange files to easily use OpenLRR
run: |
mkdir OpenLRR/OpenLRR/
Move-Item bin/openlrr-d.dll OpenLRR/OpenLRR/
Move-Item OpenLRR.exe OpenLRR/OpenLRR/
Move-Item data/* OpenLRR/OpenLRR/
- name: Upload OpenLRR Debug build
uses: actions/upload-artifact@v3
with:
name: OpenLRR-Debug
path: |
OpenLRR/
Prepare_release:
runs-on: "ubuntu-latest" # Zip action only works on Ubuntu
needs: Nightly_release_build
# Trigger when a new tag is pusht
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Set tag in env # Extract the pusht tag into a variable for later use
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Get artifact # Faster to download instead of recompile
uses: actions/download-artifact@v2
with:
name: OpenLRR-Release
- name: Zip artifact
uses: montudor/action-zip@v1
with:
args: zip -qq -r OpenLRR-${{ env.RELEASE_VERSION }}.zip OpenLRR/
- name: Draft Public Release
uses: "softprops/action-gh-release@v1"
with:
name: "Draft Release ${{ env.RELEASE_VERSION }}"
draft: true
files: OpenLRR-${{ env.RELEASE_VERSION }}.zip