Skip to content

Commit

Permalink
Autodetect APK/AAB publish launchSettings
Browse files Browse the repository at this point in the history
  • Loading branch information
gleblebedev committed Jan 24, 2024
1 parent 20b14c8 commit ffd746c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/build-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,17 @@ jobs:
working-directory: ./RbfxTemplate.Android
run: dotnet publish -f net7.0-android -c Release --no-restore -p:AndroidVersionCode=${{ needs.set_version.outputs.ANDROID_VERSION }} -p:AndroidSdkDirectory=$ANDROID_HOME -p:Version=${{ needs.set_version.outputs.BUILD_VERSION }}

- name: Find APK
run: |
dotnet tool run ezpipeline resolve-path -i ./RbfxTemplate.Android/bin/Release/**/*-Signed.apk -v APK_PATH
dotnet tool run ezpipeline resolve-path -i ./RbfxTemplate.Android/bin/Release/**/*-Signed.aab -v AAB_PATH
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
./RbfxTemplate.Android/bin/Release/net7.0-android/publish/com.companyname.RbfxTemplate.android-Signed.aab
./RbfxTemplate.Android/bin/Release/net7.0-android/publish/com.companyname.RbfxTemplate.android-Signed.apk
${{ env.APK_PATH }}
${{ env.AAB_PATH }}
name: v${{ needs.set_version.outputs.BUILD_VERSION }}
tag_name: v${{ needs.set_version.outputs.BUILD_VERSION }}
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -177,7 +182,7 @@ jobs:
if: ${{ env.BUTLER_API_KEY != '' && vars.ITCH_PROJECT != '' }}
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 ${{ vars.ITCH_PROJECT }}:android
tools/itch/butler push ${{ env.APK_PATH }} ${{ vars.ITCH_PROJECT }}:android
shell: bash
# ---------------------------------------------------------------------------------------
build_uwp:
Expand Down
1 change: 1 addition & 0 deletions RbfxTemplate.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<Content Include="**\*" Exclude="**\bin\**;**\obj\**;RbfxTemplate.csproj;.vs\**\*;.git;.vs" />
<Compile Remove="**\*" />
<None Include="README.md" Pack="true" PackagePath="/"/>
<None Include="RbfxTemplate/Properties/launchSettings.json" Pack="true" PackagePath="RbfxTemplate/Properties/"/>
</ItemGroup>

</Project>
11 changes: 11 additions & 0 deletions RbfxTemplate/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"profiles": {
"RBFX Editor": {
"commandName": "Executable",
"executablePath": "dotnet",
"commandLineArgs":
"tool run rbfx $(MSBuildProjectDirectory)/../Content/Common --plugin $(TargetDir)$(TargetFileName)",
"nativeDebugging": true
}
}
}

0 comments on commit ffd746c

Please sign in to comment.