Skip to content

Commit

Permalink
Release v3.0.3 - Beta
Browse files Browse the repository at this point in the history
  • Loading branch information
welles authored Jul 12, 2023
2 parents 71a4782 + b5d70cd commit 5ab2e88
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 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.]+)(?:-beta)<\/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
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<Version>3.0.2.0</Version>
<GameVersion>1.2.0.21654-beta</GameVersion>
<Version>3.0.3.0</Version>
<GameVersion>1.2.1.22001-beta</GameVersion>
<GameBranch>Beta</GameBranch>
<HarmonyVersion>2.2.2</HarmonyVersion>
<MCMVersion>5.8.2</MCMVersion>
Expand Down

0 comments on commit 5ab2e88

Please sign in to comment.