Skip to content

change izzyondroid package name #656

change izzyondroid package name

change izzyondroid package name #656

Workflow file for this run

name: Build
on:
push:
branches:
- master
- develop
pull_request:
branches: [ master ]
workflow_dispatch:
env:
FRAMEWORK: net8.0-android
CONFIGURATION: Release
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Android workload
run: dotnet workload install android
- name: Install Android platform tools
run: $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --install platform-tools
- name: Restore NuGet packages
run: dotnet restore
- name: Run tests
run: dotnet test --configuration $CONFIGURATION --no-restore --collect:"XPlat Code Coverage" --results-directory ./coverage Stratum.Test/Stratum.Test.csproj
- name: Publish Android
run: |
REF=$(echo $GITHUB_SHA | cut -c -7)
sed -i "s|package=\"com.stratumauth.app\"|package=\"com.stratumauth.app.$REF\"|g" Stratum.Droid/Properties/AndroidManifest.xml
sed -i "s|<string name=\"displayName\" translatable=\"false\">Authenticator</string>|<string name=\"displayName\" translatable=\"false\">Authenticator ($REF)</string>|g" Stratum.Droid/Resources/values/strings.xml
dotnet publish -f:$FRAMEWORK -c:$CONFIGURATION --no-restore Stratum.Droid/Stratum.Droid.csproj
APK=$(find Stratum.Droid/bin/$CONFIGURATION/$FRAMEWORK/publish -name '*-Signed.apk')
mv $APK "com.stratumauth.app.$REF.apk"
- name: Publish Wear OS
run: |
REF=$(echo $GITHUB_SHA | cut -c -7)
sed -i "s|package=\"com.stratumauth.app\"|package=\"com.stratumauth.app.$REF\"|g" Stratum.WearOS/Properties/AndroidManifest.xml
sed -i "s|<string name=\"displayName\" translatable=\"false\">Authenticator</string>|<string name=\"displayName\" translatable=\"false\">Authenticator ($REF)</string>|g" Stratum.WearOS/Resources/values/strings.xml
dotnet publish -f:$FRAMEWORK -c:$CONFIGURATION --no-restore Stratum.WearOS/Stratum.WearOS.csproj
APK=$(find Stratum.WearOS/bin/$CONFIGURATION/$FRAMEWORK/publish -name '*-Signed.apk')
mv $APK "com.stratumauth.app.wearos.$REF.apk"
- name: Generate coverage report
uses: irongut/[email protected]
with:
filename: coverage/**/coverage.cobertura.xml
badge: true
format: markdown
output: both
thresholds: '60 80'
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Stratum
path: |
com.stratumauth.app*.apk
code-coverage-results.md