-
Notifications
You must be signed in to change notification settings - Fork 30
53 lines (45 loc) · 1.53 KB
/
ci.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
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
CELESTE_LAUNCHER_OUTPUT: ${{github.workspace}}\Celeste_Launcher_Gui\bin\Release\net48
CELESTE_INSTALLER_OUTPUT: ${{github.workspace}}\Installer\Output
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get Build Version
run: |
$lastTagHash = $(git rev-list --tags --max-count=1)
$lastTagName = $(git describe --tags $lastTagHash)
$lastRelease = $lastTagName.Substring(1)
echo "lastReleaseVersion=$lastRelease" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
Write-Host $env:lastReleaseVersion
shell: pwsh
- uses: microsoft/setup-msbuild@v2
- uses: NuGet/setup-nuget@v2
- name: Restore NuGet packages
run: nuget restore Celeste_Launcher.sln
- name: Build solution
run: msbuild Celeste_Launcher.sln /nologo /nr:false /p:Version=$env:lastReleaseVersion /p:platform="Any CPU" /p:configuration="Release"
- name: Build installer
uses: Minionguyjpro/[email protected]
with:
path: Installer/celeste.iss
- name: Upload artifact (binary files)
uses: actions/upload-artifact@v4
with:
name: CI-Artifact-Binary
path: "${{ env.CELESTE_LAUNCHER_OUTPUT }}"
- name: Upload artifact (installer)
uses: actions/upload-artifact@v4
with:
name: CI-Artifact-Installer
path: "${{ env.CELESTE_INSTALLER_OUTPUT }}"