Skip to content

Commit

Permalink
UWP build
Browse files Browse the repository at this point in the history
  • Loading branch information
gleblebedev committed Oct 6, 2023
1 parent 1d78222 commit 911fcd0
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"ezpipeline": {
"version": "0.0.39",
"version": "0.0.40",
"commands": [
"ezpipeline"
]
Expand Down
59 changes: 57 additions & 2 deletions .github/workflows/build-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [ "master", "main" ]

jobs:
# ---------------------------------------------------------------------------------------
set_version:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -36,6 +37,7 @@ jobs:
BUILD_VERSION: ${{ env.BUILD_VERSION }}
ANDROID_VERSION: ${{ env.ANDROID_VERSION }}

# ---------------------------------------------------------------------------------------
build_desktop:
needs: set_version
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -111,7 +113,7 @@ jobs:
dotnet tool run ezpipeline -- fetch-tool --name Butler -o tools/itch
tools/itch/butler push RbfxTemplate.Desktop/bin/Release/net7.0/${{ env.RUNTIME_ID }}/publish/ rebelfork/rbfx-csharp-thirdperson:${{ env.RUNTIME_ID }}
shell: bash

# ---------------------------------------------------------------------------------------
build_android:
needs: set_version
runs-on: ubuntu-latest
Expand Down Expand Up @@ -158,4 +160,57 @@ jobs:
run: |
dotnet tool run ezpipeline -- fetch-tool --name Butler -o tools/itch
tools/itch/butler push ./RbfxTemplate.Android/bin/Release/net7.0-android/publish/com.companyname.RbfxTemplate.android-Signed.apk rebelfork/rbfx-csharp-thirdperson:android
shell: bash
shell: bash
# ---------------------------------------------------------------------------------------
build_uwp:
needs: set_version
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 1

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x

- name: Restore tools
run: dotnet tool restore

- name: Restore dependencies
working-directory: ./RbfxTemplate.UWP
run: dotnet restore

- name: Patch manifest version
working-directory: ./RbfxTemplate.UWP
run: dotnet tool run ezpipeline -- set-xml -i Package.appxmanifest -p default:Package/default:Identity -a Version -v ${{ needs.set_version.outputs.BUILD_VERSION }}

- name: Dotnet Publish
working-directory: ./RbfxTemplate.UWP
run: msbuild RbfxTemplate.UWP.csproj \
/p:AppxPackageDir=appxupload \
/p:AppxBundle=Always \
/p:AppxBundlePlatforms="x64" \
/p:Platform=x64 \
/p:AppxPackageSigningEnabled=false \
/p:UapAppxPackageBuildMode=StoreUpload \
/p:Configuration=Release \
/p:Version=${{ needs.set_version.outputs.BUILD_VERSION }}

- name: Zip Package
working-directory: ./RbfxTemplate.UWP
run: dotnet tool run ezpipeline -- zip -i appxupload/RbfxTemplate.UWP/AppPackages/RbfxTemplate.UWP_${{ needs.set_version.outputs.BUILD_VERSION }}_Test -o RbfxTemplate.UWP.x64.zip

- name: Release
working-directory: ./RbfxTemplate.UWP
uses: softprops/action-gh-release@v1
with:
files: |
appxupload/RbfxTemplate.UWP/AppPackages/RbfxTemplate.UWP_${{ needs.set_version.outputs.BUILD_VERSION }}_x64_bundle.appxupload
RbfxTemplate.UWP.x64.zip
name: v${{ needs.set_version.outputs.BUILD_VERSION }}
tag_name: v${{ needs.set_version.outputs.BUILD_VERSION }}
token: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .template.config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"{E15D7151-C812-4432-AB2A-F9EF06E4DF73}",
"{70D12BD7-3CFE-48B6-8E28-B9554FB21AD0}",
"{6EC5CAE7-DD30-4181-ADF2-B1BA19BA84F0}",
"{7DE6BF8D-C5F4-4C2A-8F02-525A97B81F1D}"
"{7DE6BF8D-C5F4-4C2A-8F02-525A97B81F1D}",
"{39ad144a-075c-4e1b-9d81-1a1e4672a258}"
],

// You can use tags to improve the metadata of your project.
Expand Down
4 changes: 2 additions & 2 deletions RbfxTemplate.UWP/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

<Identity
Name="39ad144a-075c-4e1b-9d81-1a1e4672a258"
Publisher="CN=gleb"
Version="1.0.0.0" />
Publisher="CN=RbfxTemplate"
Version="0.0.1.0" />

<mp:PhoneIdentity PhoneProductId="39ad144a-075c-4e1b-9d81-1a1e4672a258" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>

Expand Down

0 comments on commit 911fcd0

Please sign in to comment.