name: Xbox CPython Builder on: workflow_dispatch: inputs: tag_name: description: 'Tag Name' required: true default: 'v1.0.0' package_name: description: 'Package Name' required: true default: 'Cpython' jobs: build: runs-on: windows-2022 env: SolutionPath: UWP/UWPApp.sln Platform: x64 Configuration: Debug BuildMode: SideLoadOnly AppxBundle: Never ProjectPath: UWP/python34app/python34app.vcxproj ProjectDirectory: .\UWP/python34app PackageOutputRootDir: C:\AppPackage PackageOutputDir: XboxCpython steps: - name: Checkout Repository uses: actions/checkout@v4 with: submodules: recursive - name: Setup MSBuild uses: microsoft/setup-msbuild@v2 - name: Generate Self-Signed Certificate id: generate_cert run: | $cert = New-SelfSignedCertificate -CertStoreLocation "Cert:\CurrentUser\My" -Subject "CN=MyUWPCert" -KeyAlgorithm RSA -KeyLength 2048 -Provider "Microsoft Enhanced RSA and AES Cryptographic Provider" -KeyExportPolicy Exportable -NotAfter (Get-Date).AddYears(1) -Type CodeSigningCert echo "THUMBPRINT=$($cert.Thumbprint)" >> $env:GITHUB_ENV shell: pwsh - name: Set Package Name id: set_package_name run: | echo "PACKAGE_NAME=${{ github.event.inputs.package_name }}_${{ github.event.inputs.tag_name }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 - name: App Build run: | msbuild /restore ` "$env:SolutionPath" ` /p:Platform=$env:Platform ` /p:Configuration=$env:Configuration ` /p:UapAppxPackageBuildMode=$env:BuildMode ` /p:AppxBundle=$env:AppxBundle ` /p:PackageCertificateThumbprint="${{ env.THUMBPRINT }}" ` /p:AppxPackageTestDir="${env:PackageOutputRootDir}\${{ env.PACKAGE_NAME }}" ` /p:RestorePackagesConfig=true ` /p:AppxPackageSigningEnabled=true shell: pwsh - name: List Output Directory run: | Write-Host "Listing contents of output directory:" Get-ChildItem -Path "${env:PackageOutputRootDir}" -Recurse -Force shell: pwsh - name: Create Archive run: | $PackagePath = "${env:PackageOutputRootDir}" if (Test-Path $PackagePath) { Write-Host "Creating archive for: $PackagePath" Compress-Archive -Path "$PackagePath\*" -DestinationPath "${env:PackageOutputRootDir}\Pacman_Archive.zip" Write-Host "Contents of package output directory after archiving:" Get-ChildItem -Path "${env:PackageOutputRootDir}" -Recurse } else { Write-Host "Package path does not exist for archiving: $PackagePath" exit 1 } shell: pwsh - name: List Directory Contents run: | Write-Host "Listing contents of ${env:PackageOutputRootDir}:" Get-ChildItem -Path "${env:PackageOutputRootDir}" -Recurse -Force shell: pwsh - name: Upload Build Artifact uses: actions/upload-artifact@v4 with: name: IPy_Archive path: D:\a\AppPackages\cpy_Archive.zip