# Pre-release-v6.0.0.3 done #56
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: Pre-Release 🏗️ and 🚀 | |
on: | |
push: | |
tags: | |
- pre-release-v* | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Decode Keystore | |
id: decode_keystore | |
uses: timheuer/base64-to-file@v1 | |
with: | |
fileName: 'keystore/keystore.jks' | |
encodedString: ${{ secrets.KEYSTORE }} | |
- uses: actions/checkout@v2 | |
- name: set up JDK 17 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
cache: gradle | |
- name: Make gradlew executable | |
run: chmod +x ./gradlew | |
- name: Decode google-services.json | |
env: | |
GOOGLE_SERVICES_JSON: ${{ secrets.APP_GOOGLE_JSON }} | |
run: echo $GOOGLE_SERVICES_JSON > ./bitapp/google-services.json | |
- name: Creating Local.Properties | |
env: | |
FIREBASE_WEB_CLIENT_ID: ${{ secrets.FIREBASE_WEB_CLIENT_ID }} | |
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} | |
run: | | |
echo "firebaseWebClient=${FIREBASE_WEB_CLIENT_ID}" >> ./local.properties | |
echo "apiKey=${GEMINI_API_KEY}" >> ./local.properties | |
- name: Copy Keystore to Project | |
run: | | |
mkdir -p ./bitapp/keystore | |
cp ${{ steps.decode_keystore.outputs.filePath }} './bitapp/keystore/keystore.jks' | |
echo ${{ steps.decode_keystore.outputs.filePath }} | |
ls -la ./bitapp | |
- name: Build Release APK and Bundle | |
run: ./gradlew :bitapp:assembleBetaRelease --stacktrace :bitapp:bundleBetaRelease --stacktrace | |
env: | |
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }} | |
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} | |
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }} | |
- name: Upload APK | |
uses: actions/upload-artifact@v2 | |
with: | |
name: apk | |
retention-days: 1 | |
path: bitapp/build/outputs/apk/beta/release/bitapp-beta-release.apk | |
- name: Upload Bundle | |
uses: actions/upload-artifact@v2 | |
with: | |
name: bundle | |
retention-days: 1 | |
path: bitapp/build/outputs/bundle/betaRelease/bitapp-beta-release.aab | |
release: | |
name: Publish APK to GitHub | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download APK from build | |
uses: actions/download-artifact@v3 | |
with: | |
name: apk | |
- name: Download Bundle from build | |
uses: actions/download-artifact@v3 | |
with: | |
name: bundle | |
- name: Rename files | |
run: | | |
echo ${{ github.ref }} | |
v=$(echo ${{ github.ref }} | cut -c 11-) | |
echo $v | |
mv bitapp-beta-release.apk bitapp-$v.apk | |
mv bitapp-beta-release.aab bitapp-$v.aab | |
- name: Upload APK to Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.ACCOUNT_TOKEN }} | |
uses: softprops/action-gh-release@v1 | |
with: | |
fail_on_missing: true | |
files: | | |
bitapp-*.apk | |
bitapp-*.aab | |
prerelease: true | |
tag_name: ${{ steps.create_release.outputs.tag_name }} | |
name: ${{ github.event.inputs.releaseName }} | |
token: ${{ secrets.ACCOUNT_TOKEN }} | |
buildDocs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Make gradlew executable | |
run: chmod +x gradlew | |
- name: Decode google-services.json | |
env: | |
GOOGLE_SERVICES_JSON: ${{ secrets.APP_GOOGLE_JSON }} | |
run: echo $GOOGLE_SERVICES_JSON > ./bitapp/google-services.json | |
- name: Creating Local.Properties | |
env: | |
FIREBASE_WEB_CLIENT_ID: ${{ secrets.FIREBASE_WEB_CLIENT_ID }} | |
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} | |
run: | | |
echo "firebaseWebClient=${FIREBASE_WEB_CLIENT_ID}" >> ./local.properties | |
echo "apiKey=${GEMINI_API_KEY}" >> ./local.properties | |
- name: Generate Dokka docs | |
run: ./gradlew dokkaHtmlMultiModule | |
- name: Upload Kt docs | |
uses: actions/upload-artifact@v2 | |
with: | |
name: kt-docs | |
path: build/dokka | |
retention-days: 1 | |
- name: Uploading mk-docs | |
uses: actions/upload-artifact@v2 | |
with: | |
name: mk-docs | |
path: mk-docs | |
retention-days: 1 | |
setting-up: | |
runs-on: ubuntu-latest | |
needs: buildDocs | |
steps: | |
- name: Download docs | |
uses: actions/download-artifact@v3 | |
with: | |
name: kt-docs | |
- name: Download MkDocs | |
uses: actions/download-artifact@v3 | |
with: | |
name: mk-docs | |
- name: Copy docs | |
run: | | |
ls -la | |
mkdir -p copyDoc/generated | |
cp mkdocs.yml copyDoc/generated | |
mkdir -p copyDoc/generated/docs | |
cp -r docs/* copyDoc/generated/docs | |
ls -la copyDoc/generated/docs | |
mkdir -p copyDoc/generated/docs/app | |
cp -r htmlMultiModule/* copyDoc/generated/docs/app | |
ls -la copyDoc/generated/docs/app | |
- name: Upload docs | |
uses: actions/upload-artifact@v2 | |
with: | |
name: generated-docs | |
path: copyDoc | |
retention-days: 1 | |
deploy: | |
runs-on: ubuntu-latest | |
needs: setting-up | |
permissions: write-all | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Configure Git Credentials | |
run: | | |
git config user.name github-actions[bot] | |
git config user.email 41898282+github-actions[bot]@users.noreply.github.com | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | |
- uses: actions/cache@v3 | |
with: | |
key: mkdocs-material-${{ env.cache_id }} | |
path: .cache | |
restore-keys: | | |
mkdocs-material- | |
- name: Download docs | |
uses: actions/download-artifact@v3 | |
with: | |
name: generated-docs | |
- uses: joutvhu/get-release@v1 | |
id: latest_release | |
with: | |
latest: true | |
pattern: 'v.+' | |
prerelease: false | |
- run: | | |
cd generated | |
v=$(echo ${{ github.ref }} | cut -c 23-) | |
sed -i -E 's/stable.+/stable: ${{ steps.latest_release.outputs.tag_name }}/' mkdocs.yml | |
sed -i -E "s/pre_release.+/pre_release: $v /" mkdocs.yml | |
pip install mkdocs-material | |
pip install mkdocs-glightbox | |
pip install mkdocs-markdownextradata-plugin | |
- run: | | |
cd generated | |
mkdocs gh-deploy --force |