fix appsettings.serects.json #58
Workflow file for this run
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: PUBLISH Blazor | |
on: | |
push: | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+" | |
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: | |
# Blazor Android Build | |
build-android: | |
runs-on: macos-latest | |
name: Android Build | |
steps: | |
- name: Checkout | |
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 | |
# Store the version, stripping any v-prefix | |
- name: Prepare release version | |
run: | | |
TAG=$GITHUB_REF_NAME | |
VERSION=$(echo $TAG | sed -e 's/^v//') | |
APP_VERSION=$(echo $VERSION | sed -e 's/\./ /g' | xargs printf "%d%03d%03d") | |
APP_DISPLAY_VERSION=$VERSION | |
echo "APP_VERSION=$APP_VERSION" >> $GITHUB_ENV | |
echo "APP_DISPLAY_VERSION=$APP_DISPLAY_VERSION" >> $GITHUB_ENV | |
env | |
- name: Retrieve the secret and decode it to a file | |
env: | |
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }} | |
run: | | |
echo "$KEYSTORE_BASE64" | base64 --decode > src/V2ex.Blazor/v2ex.maui.keystore | |
- name: Setup .NET 8 | |
uses: xt0rted/setup-dotnet@6f04e7f8ca9ff2faf76540fe2e3ebc595ca38b6b | |
with: | |
dotnet-version: 8.0.x | |
include-prerelease: true | |
- name: Install Blazor Workload | |
run: dotnet workload install maui --ignore-failed-sources | |
- name: Restore Dependencies | |
run: dotnet restore src/V2ex.Blazor/V2ex.Blazor.csproj | |
- name: Build Blazor Android | |
run: dotnet publish src/V2ex.Blazor/V2ex.Blazor.csproj -c Release -f net8.0-android --no-restore -p:AndroidKeyStore=true -p:AndroidSigningKeyStore=v2ex.maui.keystore -p:AndroidSigningKeyAlias=v2ex.maui -p:AndroidSigningKeyPass=$KEY_PASSWORD -p:AndroidSigningStorePass=$KEY_PASSWORD -p:ApplicationDisplayVersion=$APP_DISPLAY_VERSION -p:ApplicationVersion=$APP_VERSION | |
env: | |
APP_DISPLAY_VERSION: ${{ env.APP_DISPLAY_VERSION }} | |
APP_VERSION: ${{ env.APP_VERSION }} | |
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
- name: Upload Android Artifact | |
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 | |
with: | |
name: V2ex.Blazor-android-build | |
path: src/V2ex.Blazor/bin/Release/net8.0-android/*Signed.a* | |
- name: Publish To AppCenter | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
npm install -g appcenter-cli | |
git log --oneline --decorate > notes.txt | |
cat notes.txt | |
appcenter distribute release -f src/V2ex.Blazor/bin/Release/net8.0-android/top.rwecho.v2ex.maui-Signed.apk -R notes.txt -a HappyTreeFriends/V2exMaui --group External --build-version ${{ github.ref_name }} --token ${{ secrets.APPCENTER_TOKEN }} | |
- name: Publish To Google Play | |
uses: r0adkll/upload-google-play@v1 | |
with: | |
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }} | |
packageName: top.rwecho.v2ex.maui | |
releaseFiles: src/V2ex.Blazor/bin/Release/net8.0-android/top.rwecho.v2ex.maui-Signed.aab | |
track: internal |