Skip to content

Commit

Permalink
Release v3.0.3 - Stable
Browse files Browse the repository at this point in the history
  • Loading branch information
welles authored Jul 12, 2023
2 parents 91c3f56 + 6311055 commit 4e8a099
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
"mod_version=$ModVersion" >> $env:GITHUB_ENV
Write-Output "ModVersion: ""$ModVersion"""
#---------------------------------------------------------------------------------------------------------------------------------------------------------------------
$GameVersion = Get-Content .\Directory.Build.props | Select-String -Pattern "<GameVersion>([\d.]+)<\/GameVersion>" | % { $($_.Matches.Groups[1]).Value }
$GameVersion = Get-Content .\Directory.Build.props | Select-String -Pattern "<GameVersion>([\d.]+)(?:-beta)?<\/GameVersion>" | % { $($_.Matches.Groups[1]).Value }
"game_version=$GameVersion" >> $env:GITHUB_ENV
Write-Output "GameVersion: ""$GameVersion"""
#---------------------------------------------------------------------------------------------------------------------------------------------------------------------
Expand All @@ -38,26 +38,23 @@ jobs:
#---------------------------------------------------------------------------------------------------------------------------------------------------------------------
$RepoBranch = "${{github.ref}}"
$RepoBranch = $RepoBranch.Split("/")[-1]
If ($RepoBranch -eq "stable") { $RepoBranch = "" }
If ($RepoBranch) { $RepoBranch = "-$RepoBranch" }
"repo_branch=$RepoBranch" >> $env:GITHUB_ENV
Write-Output "RepoBranch: ""$RepoBranch"""
#---------------------------------------------------------------------------------------------------------------------------------------------------------------------
$Prerelease = "${{github.ref}}"
$Prerelease = $Prerelease.Split("/")[-1]
If ($Prerelease -eq "stable") { $Prerelease = "false" } Else { $Prerelease = "true" }
If ($GameBranch -eq "Beta") { $Prerelease = "true" } Else { $Prerelease = "false" }
"prerelease=$Prerelease" >> $env:GITHUB_ENV
Write-Output "Prerelease: ""$Prerelease"""
#---------------------------------------------------------------------------------------------------------------------------------------------------------------------
$ZipName = "BannerlordCheats_v$($ModVersion)_for_v$($GameVersion)"
$ZipName = "BannerlordCheats_v$($ModVersion)_for_$($GameBranch)_v$($GameVersion)"
"zip_name=$ZipName" >> $env:GITHUB_ENV
Write-Output "ZipName: ""$ZipName"""
#---------------------------------------------------------------------------------------------------------------------------------------------------------------------
$TagName = "v$ModVersion$RepoBranch"
If ($Prerelease -eq "true") { $RepoBranchAddition = "-$RepoBranch" }
$TagName = "v$ModVersion$RepoBranchAddition"
"tag_name=$TagName" >> $env:GITHUB_ENV
Write-Output "TagName: ""$TagName"""
#---------------------------------------------------------------------------------------------------------------------------------------------------------------------
$ReleaseTitle = "Release v$($ModVersion) for v$($GameVersion)"
$ReleaseTitle = "Release v$($ModVersion) for $($GameBranch) v$($GameVersion)"
"release_title=$ReleaseTitle" >> $env:GITHUB_ENV
Write-Output "ReleaseTitle: ""$ReleaseTitle"""
Expand All @@ -80,6 +77,7 @@ jobs:
with:
tag_name: ${{env.tag_name}}
name: ${{env.release_title}}
target_commitish: ${{env.repo_branch}}
draft: false
prerelease: ${{env.prerelease}}
files: ${{env.zip_name}}.zip
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Version>3.0.2.0</Version>
<Version>3.0.3.0</Version>
<GameVersion>1.1.5.21456</GameVersion>
<GameBranch>Stable</GameBranch>
<HarmonyVersion>2.2.2</HarmonyVersion>
Expand Down

0 comments on commit 4e8a099

Please sign in to comment.