Skip to content

Added route 701

Added route 701 #72

name: windowsCI
on:
push:
branches: [ ]
pull_request:
branches: [ ]
workflow_dispatch:
env:
DOTNETVERSION: 8.0.x
jobs:
buildAndroid:
runs-on: windows-2022
steps:
- uses: actions/checkout@v2
- name: Setup .NET SDK ${{env.DOTNETVERSION}}
uses: actions/setup-dotnet@v1
with:
dotnet-version: '${{env.DOTNETVERSION}}'
- name: List installed .NET info
shell: pwsh
run: dotnet --info
- name: Install .NET MAUI
shell: bash
run: |
dotnet nuget locals all --clear
dotnet workload install android
dotnet workload install maui
- name: Setup Java 11
uses: actions/setup-java@v1
with:
java-version: '11'
- name: Restore nuget packages
run: |
dotnet restore BusSchedule.sln
- name: Setup project
shell: bash
env:
DATA: ${{ secrets.GOOGLE_SERVICES_JSON}}
KEYS: ${{ secrets.KEYS_FILE}}
run: |
touch BusSchedule.Android/Assets/google-services.json
touch BusSchedule.Android/Resources/values/keys.xml
echo $DATA | base64 -di > BusSchedule.Android/Assets/google-services.json
echo $KEYS > BusSchedule.Android/Resources/values/keys.xml
- name: Create Keystore file
uses: timheuer/base64-to-file@v1
with:
fileName: "keystore.jks"
fileDir: "BusSchedule.Android/"
encodedString: ${{ secrets.KEYSTORE }}
- name: Get Version
env:
NUM: ${{ github.run_number }}
run: |
$version = (150+$($Env:GITHUB_RUN_NUMBER))
echo $version
echo "VERSION_NUMBER=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
- name: Set version
uses: damienaicheh/[email protected]
with:
android-manifest-path: './BusSchedule.Android/Properties/AndroidManifest.xml'
version-code: ${{ env.VERSION_NUMBER }}
print-file: true
version-name: '6.0'
- name: Build
run: |
dotnet build BusSchedule.Android/BusSchedule.Android.csproj -c Release /p:AndroidKeyStore=true /p:AndroidSigningKeyStore=keystore.jks /p:AndroidSigningKeyAlias=${{ secrets.KEYSTORE_ALIAS }} /p:AndroidSigningKeyPass=${{ secrets.KEYSTORE_PASS }} /p:AndroidSigningStorePass=${{ secrets.KEYSTORE_ALIAS_PASS }} --no-restore
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: Bundle
path: BusSchedule.Android/bin/Release/net8.0-android34.0/com.darktower.bus-Signed.aab
retention-days: 5
- name: Upload build to Google Play
if: ${{ github.ref_name == 'master' }}
uses: KevinRohn/[email protected]
with:
service_account_json: ${{ secrets.SERVICE_ACCOUNT_JSON }}
package_name: "com.darktower.bus"
aab_file_path: "BusSchedule.Android/bin/Release/net8.0-android34.0/com.darktower.bus-Signed.aab"
track: "beta"
release_status: "draft"