You've already forked OpenRCT2-Unity
mirror of
https://github.com/izzy2lost/OpenRCT2-Unity.git
synced 2026-03-10 12:38:22 -07:00
58 lines
2.2 KiB
YAML
58 lines
2.2 KiB
YAML
name: Build OpenRCT2-Unity UWP
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
fetch-depth: 0
|
|
|
|
- name: Generate Self-Signed Certificate
|
|
shell: powershell
|
|
run: |
|
|
# Generate a self-signed certificate
|
|
$cert = New-SelfSignedCertificate -Type Custom -Subject "CN=OpenRCT2-Unity" -KeyUsage DigitalSignature -FriendlyName "OpenRCT2 UWP Cert" -CertStoreLocation "Cert:\CurrentUser\My" -NotAfter (Get-Date).AddYears(5)
|
|
|
|
# Export the certificate as PFX
|
|
$certPassword = ConvertTo-SecureString -String "YourPassword" -Force -AsPlainText
|
|
$pfxPath = "$env:USERPROFILE\OpenRCT2-UWP.pfx"
|
|
Export-PfxCertificate -Cert $cert -FilePath $pfxPath -Password $certPassword
|
|
|
|
# Base64 encode the .pfx
|
|
$base64Cert = [Convert]::ToBase64String([IO.File]::ReadAllBytes($pfxPath))
|
|
|
|
# Save the base64 encoded .pfx as an output for later use
|
|
echo "::set-output name=certificate_base64::$base64Cert"
|
|
echo "::set-output name=certificate_password::YourPassword"
|
|
|
|
- name: Save PFX Certificate for Later Use
|
|
shell: powershell
|
|
run: |
|
|
# Decode the base64 certificate from the previous step
|
|
$certBytes = [System.Convert]::FromBase64String("${{ steps.generate.outputs.certificate_base64 }}")
|
|
[System.IO.File]::WriteAllBytes("OpenRCT2-UWP.pfx", $certBytes)
|
|
|
|
- name: Build OpenRCT2-Unity for UWP
|
|
id: build
|
|
uses: buildalon/unity-uwp-builder@v1.0.4
|
|
with:
|
|
project-path: 'src/openrct2-unity'
|
|
architecture: 'x64'
|
|
configuration: 'Master'
|
|
package-type: 'sideload'
|
|
certificate-path: 'OpenRCT2-UWP.pfx'
|
|
additional-args: '-p:PackageCertificateKeyFile=OpenRCT2-UWP.pfx -p:PackageCertificatePassword=${{ steps.generate.outputs.certificate_password }}'
|
|
|
|
- name: Upload UWP Build as Artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: OpenRCT2-UWP
|
|
path: 'src/openrct2-unity/BuildOutput/*.appx'
|