This commit is contained in:
1 parent
5d549ff66a
commit
e831d0dfe0
28 files changed
+1026
-286
No files matched your search
@@ -4,10 +4,12 @@ on:
|
||||
paths:
|
||||
- 'Plain Craft Launcher 2/**'
|
||||
- '.github/workflows/**'
|
||||
- 'scripts/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'Plain Craft Launcher 2/**'
|
||||
- '.github/workflows/**'
|
||||
- 'scripts/**'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
@@ -50,10 +52,15 @@ jobs:
|
||||
Set-Location ${{ GITHUB.WORKSPACE }}
|
||||
|
||||
|
||||
- name: Replace
|
||||
- name: Prepare build configuration
|
||||
shell: pwsh
|
||||
env:
|
||||
PCL_MS_CLIENT_ID: ${{ vars.PCL_MS_CLIENT_ID || secrets.CLIENT_ID }}
|
||||
PCL_CURSEFORGE_API_KEY: ${{ secrets.PCL_CURSEFORGE_API_KEY || secrets.CURSEFORGE_API_KEY }}
|
||||
run: ./scripts/Write-BuildCredentials.ps1
|
||||
|
||||
- name: Set commit hash
|
||||
run: |
|
||||
(gc "Plain Craft Launcher 2\Modules\ModSecret.vb") -replace 'Public OAuthClientId As String = If(Environment.GetEnvironmentVariable("PCL_MS_CLIENT_ID"), "")', 'Public OAuthClientId As String = If(Environment.GetEnvironmentVariable("PCL_MS_CLIENT_ID"), "${{ secrets.CLIENT_ID }}")' | Out-File "Plain Craft Launcher 2\Modules\ModSecret.vb"
|
||||
(gc "Plain Craft Launcher 2\Modules\ModSecret.vb") -replace 'Public CurseForgeAPIKey As String = If(Environment.GetEnvironmentVariable("PCL_CURSEFORGE_API_KEY"), "")', 'Public CurseForgeAPIKey As String = If(Environment.GetEnvironmentVariable("PCL_CURSEFORGE_API_KEY"), "${{ secrets.CURSEFORGE_API_KEY }}")' | Out-File "Plain Craft Launcher 2\Modules\ModSecret.vb"
|
||||
(gc "Plain Craft Launcher 2\Modules\Base\ModBase.vb") -replace 'Public Const CommitHash As String = ""', 'Public Const CommitHash As String = "${{ github.sha }}"' | Out-File "Plain Craft Launcher 2\Modules\Base\ModBase.vb"
|
||||
|
||||
- name: Restore NuGet Packages
|
||||
@@ -67,3 +74,10 @@ jobs:
|
||||
with:
|
||||
name: ${{ matrix.configuration }} ${{ env.describe }}
|
||||
path: Plain Craft Launcher 2\obj\${{ matrix.configuration }}\Plain Craft Launcher 2.exe
|
||||
|
||||
- name: Clean generated configuration
|
||||
if: ${{ always() }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
$path = 'Plain Craft Launcher 2/obj/BuildCredentials.json'
|
||||
if (Test-Path -LiteralPath $path) { Remove-Item -LiteralPath $path -Force }
|
||||
Reference in new issue
Block a user