update version #64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: .NET Core Desktop - Build and Deploy | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
workflow_dispatch: | |
env: | |
AZURE_WEBAPP_NAME: ned-wot | |
AZURE_WEBAPP_PACKAGE_PATH: battleresults-app | |
DOTNET_VERSION: 8.0.x | |
APP_PACKAGES_LOCATION: NED.WoT.BattleResults.Client\bin\Release\net8.0-windows10.0.19041.0\win10-x64\AppPackages | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install .NET Core | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: ${{ env.DOTNET_VERSION }} | |
- name: Install MAUI workload | |
run: dotnet workload install maui | |
- name: Decrypt PFX File | |
run: | | |
echo "${{ secrets.WINDOWS_PFX_FILE}}" > cert.pfx.asc | |
certutil -decode cert.pfx.asc cert.pfx | |
- name: Add Cert to Store | |
run: certutil -user -q -p ${{ secrets.WINDOWS_PFX_PASSWORD }} -importpfx cert.pfx NoRoot | |
- name: Build | |
run: dotnet publish NED.WoT.BattleResults.Client\NED.WoT.BattleResults.Client.csproj -c Release -f:net8.0-windows10.0.19041.0 | |
- name: Update .appinstaller file | |
run: | | |
sed -i 's|http://schemas.microsoft.com/appx/appinstaller/2017/2|http://schemas.microsoft.com/appx/appinstaller/2021|' 'NED.WoT.BattleResults.Client/bin/Release/net8.0-windows10.0.19041.0/win10-x64/AppPackages/NED.WoT.BattleResults.Client_x64.appinstaller' | |
sed -i 's|HoursBetweenUpdateChecks="0"|HoursBetweenUpdateChecks="0" ShowPrompt="true" UpdateBlocksActivation="true"|' 'NED.WoT.BattleResults.Client/bin/Release/net8.0-windows10.0.19041.0/win10-x64/AppPackages/NED.WoT.BattleResults.Client_x64.appinstaller' | |
- name: Deploy to Azure webapp | |
uses: azure/webapps-deploy@v2 | |
with: | |
app-name: ${{ env.AZURE_WEBAPP_NAME }} | |
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} | |
package: 'NED.WoT.BattleResults.Client/bin/Release/net8.0-windows10.0.19041.0/win10-x64/AppPackages' |