chore(actions): distribute appinstaller
Signed-off-by: seth <getchoo@tuta.io>
This commit is contained in:
parent
6866e5367e
commit
32b9adec82
52
.github/workflows/build.yml
vendored
52
.github/workflows/build.yml
vendored
@ -439,14 +439,14 @@ jobs:
|
|||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
Set-Location ${{ env.INSTALL_DIR }}
|
Set-Location ${{ env.INSTALL_DIR }}
|
||||||
|
|
||||||
# MSIX only allows numbers in their versions,
|
# MSIX only allows numbers in their versions,
|
||||||
# so we need to sacrifice a bit of verbosity
|
# so we need to use another clear identifier
|
||||||
$commitNumbers = ("${{ env.VERSION }}" -replace "[^0-9]", "").Substring(0, 3)
|
$version = ("${{ github.run_number }}").Substring(0, 3)
|
||||||
$version = "7.0.0.$commitNumbers"
|
|
||||||
|
|
||||||
Copy-Item ${{ github.workspace }}\program_info\prismlauncher_*x*.png .
|
Copy-Item ${{ github.workspace }}\program_info\prismlauncher_*x*.png .
|
||||||
(Get-Content ${{ github.workspace }}\program_info\AppxManifest.xml) `
|
(Get-Content ${{ github.workspace }}\program_info\AppxManifest.xml) `
|
||||||
-replace "PRISM_VERSION_REPLACEME","$version" `
|
-replace "PRISM_VERSION_REPLACEME","7.0.0.$version" `
|
||||||
-replace "PRISM_ARCH_REPLACEME","${{ matrix.architecture }}" `
|
-replace "PRISM_ARCH_REPLACEME","${{ matrix.architecture }}" `
|
||||||
> .\AppxManifest.xml
|
> .\AppxManifest.xml
|
||||||
|
|
||||||
@ -603,11 +603,12 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
ccache -s
|
ccache -s
|
||||||
|
|
||||||
msix-bundle:
|
appinstaller:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
needs: build
|
needs: build
|
||||||
env:
|
env:
|
||||||
BUNDLE_STAGING: "bundle_staging"
|
BUNDLE_STAGING: "bundle_staging"
|
||||||
|
APPINSTALLER_STAGING: "appinstaller_staging"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install MSVC
|
- name: Install MSVC
|
||||||
@ -624,9 +625,17 @@ jobs:
|
|||||||
ver_short=`git rev-parse --short HEAD`
|
ver_short=`git rev-parse --short HEAD`
|
||||||
echo "VERSION=$ver_short" >> $GITHUB_ENV
|
echo "VERSION=$ver_short" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Set Appx version
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
$version = ("${{ github.run_number }}").Substring(0, 3)
|
||||||
|
"APPX_VERSION=7.0.0.$version" >> $env:GITHUB_ENV
|
||||||
|
|
||||||
- name: Create Bundle Staging Directory
|
- name: Create Bundle Staging Directory
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: New-Item -Type Directory -Path ${{ env.BUNDLE_STAGING }}
|
run: |
|
||||||
|
New-Item -Type Directory -Path ${{ env.BUNDLE_STAGING }}
|
||||||
|
New-Item -Type Directory -Path ${{ env.APPINSTALLER_STAGING }}
|
||||||
|
|
||||||
- name: Download MSIX (x64)
|
- name: Download MSIX (x64)
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v2
|
||||||
@ -643,7 +652,14 @@ jobs:
|
|||||||
- name: Create MSIXBundle
|
- name: Create MSIXBundle
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
makeappx.exe bundle /d ${{ env.BUNDLE_STAGING }} /p ${{ env.BUNDLE_STAGING }}\prismlauncher.msixbundle
|
makeappx.exe bundle /d ${{ env.BUNDLE_STAGING }} /p ${{ env.BUNDLE_STAGING }}\prismlauncher-${{ env.APPX_VERSION }}.msixbundle
|
||||||
|
|
||||||
|
- name: Update AppInstaller File
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
(Get-Content ${{ github.workspace }}\program_info\prismlauncher.AppInstaller) `
|
||||||
|
-replace "PRISM_VERSION_REPLACEME","${{ env.APPX_VERSION }}" `
|
||||||
|
> ${{ env.APPINSTALLER_STAGING }}\prismlauncher-${{ env.APPX_VERSION }}.appInstaller
|
||||||
|
|
||||||
- name: Fetch codesign certificate
|
- name: Fetch codesign certificate
|
||||||
shell: bash
|
shell: bash
|
||||||
@ -657,7 +673,19 @@ jobs:
|
|||||||
SignTool sign /fd sha256 /td sha256 /f codesign.pfx `
|
SignTool sign /fd sha256 /td sha256 /f codesign.pfx `
|
||||||
/p '${{ secrets.WINDOWS_CODESIGN_PASSWORD }}' `
|
/p '${{ secrets.WINDOWS_CODESIGN_PASSWORD }}' `
|
||||||
/tr http://timestamp.digicert.com `
|
/tr http://timestamp.digicert.com `
|
||||||
${{ env.BUNDLE_STAGING }}\prismlauncher.msixbundle
|
${{ env.BUNDLE_STAGING }}\prismlauncher-${{ env.APPX_VERSION }}.msixbundle
|
||||||
|
} else {
|
||||||
|
":warning: Skipped code signing for Windows, as certificate was not present." >> $env:GITHUB_STEP_SUMMARY
|
||||||
|
}
|
||||||
|
|
||||||
|
- name: Sign AppInstaller
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
if (Get-Content ./codesign.pfx) {
|
||||||
|
SignTool sign /fd sha256 /td sha256 /f codesign.pfx `
|
||||||
|
/p '${{ secrets.WINDOWS_CODESIGN_PASSWORD }}' `
|
||||||
|
/tr http://timestamp.digicert.com `
|
||||||
|
${{ env.APPINSTALLER_STAGING }}\prismlauncher-${{ env.APPX_VERSION }}.AppInstaller
|
||||||
} else {
|
} else {
|
||||||
":warning: Skipped code signing for Windows, as certificate was not present." >> $env:GITHUB_STEP_SUMMARY
|
":warning: Skipped code signing for Windows, as certificate was not present." >> $env:GITHUB_STEP_SUMMARY
|
||||||
}
|
}
|
||||||
@ -666,7 +694,13 @@ jobs:
|
|||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: PrismLauncher-Windows-MSVC-Universal-MSIXBundle-${{ env.VERSION }}-${{ inputs.build_type }}
|
name: PrismLauncher-Windows-MSVC-Universal-MSIXBundle-${{ env.VERSION }}-${{ inputs.build_type }}
|
||||||
path: ${{ env.BUNDLE_STAGING }}/prismlauncher.msixbundle
|
path: ${{ env.BUNDLE_STAGING }}/prismlauncher-${{ env.APPX_VERSION }}.msixbundle
|
||||||
|
|
||||||
|
- name: Upload AppInstaller
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: PrismLauncher-Windows-MSVC-Universal-AppInstaller-${{ env.VERSION }}-${{ inputs.build_type }}
|
||||||
|
path: ${{ env.APPINSTALLER_STAGING }}/prismlauncher-${{ env.APPX_VERSION }}.AppInstaller
|
||||||
|
|
||||||
flatpak:
|
flatpak:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
<MainBundle
|
<MainBundle
|
||||||
Name="github.PrismLauncher.PrismLauncher"
|
Name="github.PrismLauncher.PrismLauncher"
|
||||||
Publisher="CN=PrismLauncher, O=PrismLauncher, L=MyCity, S=MyState, C=MyCountry"
|
Publisher="CN=PrismLauncher, O=PrismLauncher, L=MyCity, S=MyState, C=MyCountry"
|
||||||
Version="7.0.0.0"
|
Version="PRISM_VERSION_REPLACEME"
|
||||||
Uri="https://prismlauncher.org/prismlauncher.msixbundle" />
|
Uri="https://prismlauncher.org/prismlauncher-PRISM_VERSION_REPLACEME.msixbundle" />
|
||||||
|
|
||||||
<UpdateSettings>
|
<UpdateSettings>
|
||||||
<OnLaunch
|
<OnLaunch
|
||||||
|
Loading…
Reference in New Issue
Block a user