Build #67
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: Build | |
on: | |
push: | |
branches: [ main, beta ] | |
paths-ignore: | |
- '**/*.md' | |
- '**/*.gitignore' | |
- '**/*.gitattributes' | |
workflow_dispatch: | |
permissions: | |
contents: read | |
env: | |
DOTNET_NOLOGO: true # Disable the .NET logo | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true # Disable the .NET first time experience | |
DOTNET_CLI_TELEMETRY_OPTOUT: true # Disable sending .NET CLI telemetry | |
jobs: | |
build-android: | |
runs-on: windows-2022 | |
name: Android Build | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Install GitVersion | |
uses: gittools/actions/gitversion/[email protected] | |
with: | |
versionSpec: '5.x' | |
preferLatestVersion: true | |
- name: Determine Version | |
id: gitversion | |
uses: gittools/actions/gitversion/[email protected] | |
with: | |
useConfigFile: true | |
- name: Write Version | |
run: echo "${{ steps.gitversion.outputs.semVer }}" >> version | |
- name: Setup .NET 8 | |
uses: actions/[email protected] | |
with: | |
dotnet-version: '8.0.x' | |
include-prerelease: true | |
- name: Setup Java JDK | |
uses: actions/[email protected] | |
with: | |
distribution: microsoft | |
java-version: '11' | |
- name: Install MAUI Workloads | |
run: | | |
dotnet workload install android --ignore-failed-sources | |
dotnet workload install maui --ignore-failed-sources | |
- name: Restore Dependencies | |
run: dotnet restore RosyCrow.csproj | |
- name: Build | |
run: dotnet build RosyCrow.csproj -c Release -f net8.0-android --no-restore -p:ApplicationDisplayVersion=${{ steps.gitversion.outputs.semVer }} | |
env: | |
ROSYCROW_SIGNING_KEY_PASSWORD: ${{ secrets.ROSYCROW_SIGNING_KEY_PASSWORD }} | |
- name: Copy Packages | |
run: | | |
cp bin\Release\net8.0-android\app.rosy_crow-Signed.aab . | |
cp bin\Release\net8.0-android\app.rosy_crow-Signed.apk . | |
- name: Upload Bundle | |
uses: actions/[email protected] | |
with: | |
retention-days: 14 | |
name: bundle-${{ steps.gitversion.outputs.semVer }} | |
path: | | |
app.rosy_crow-Signed.aab | |
app.rosy_crow-Signed.apk | |
version |