-
Notifications
You must be signed in to change notification settings - Fork 28
66 lines (54 loc) · 2.06 KB
/
release-build.yml
File metadata and controls
66 lines (54 loc) · 2.06 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
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
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/Inno-Setup-Action@v1.2.7
with:
path: Installer/celeste.iss
- name: Zip the build output directory
run: Compress-Archive -Path ${{ env.CELESTE_LAUNCHER_OUTPUT }}\* -Destination CelesteLauncher.zip
- name: Copy installer artifact
run: cp "${{ env.CELESTE_INSTALLER_OUTPUT }}\Celeste Installer.exe" "Celeste Installer.exe"
- name: Generate changelog
id: generate_changelog
run: |
$PREVIOUS_TAG = "v$env:lastReleaseVersion"
$CURRENT_TAG = "$(git describe --tags)"
Write-Output "Previous tag: $PREVIOUS_TAG"
Write-Output "Current tag: $CURRENT_TAG"
git log "$PREVIOUS_TAG..$CURRENT_TAG" --pretty=format:"* %h %s" --abbrev-commit > Changelog.md
Write-Output "Changelog:"
Get-Content Changelog.md
- name: Release
uses: softprops/action-gh-release@v2
with:
draft: true
body_path: Changelog.md
files: |
CelesteLauncher.zip
Celeste Installer.exe