Skip to content

Refactor EditorViewModel: StateFlow single source of truth, fix page … #338

Refactor EditorViewModel: StateFlow single source of truth, fix page …

Refactor EditorViewModel: StateFlow single source of truth, fix page … #338

Workflow file for this run

name: Build and Release Preview
on:
push:
branches: ["dev"]
paths:
- 'app/**'
workflow_dispatch:
env:
MAVEN_OPTS: >-
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set up JDK 18
uses: actions/setup-java@v3
with:
java-version: "18"
distribution: "temurin"
# cache: gradle
- uses: gradle/gradle-build-action@v2
with:
gradle-version: 8.5
- name: Decode Keystore
id: decode_keystore
uses: timheuer/base64-to-file@v1.1
with:
fileDir: "./secrets"
fileName: "my.keystore"
encodedString: ${{ secrets.KEYSTORE_FILE }}
- name: Remove `google-services.json`
run: rm ${{ github.workspace }}/app/google-services.json
- name: Decode and Replace `google-services.json`
env:
FIREBASE_CONFIG: ${{ secrets.FIREBASE_CONFIG }}
run: |
echo $FIREBASE_CONFIG | base64 --decode > ${{ github.workspace }}/app/google-services.json
wc -l ${{ github.workspace }}/app/google-services.json
- name: Execute Gradle build
run: |
export STORE_FILE="../${{ steps.decode_keystore.outputs.filePath }}"
export STORE_PASSWORD="${{ secrets.KEYSTORE_PASSWORD }}"
export KEY_ALIAS="${{ secrets.KEY_ALIAS }}"
export KEY_PASSWORD="${{ secrets.KEY_PASSWORD }}"
export SHIPBOOK_APP_ID="${{ secrets.SHIPBOOK_APP_ID }}"
export SHIPBOOK_APP_KEY="${{ secrets.SHIPBOOK_APP_KEY }}"
./gradlew \
-PIS_NEXT=true \
assembleDebug
# - name: Cache Gradle packages
# uses: actions/cache@v1
# with:
# path: ~/.gradle/caches
# key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
# restore-keys: ${{ runner.os }}-gradle
- run: mv ${{ github.workspace }}/app/build/outputs/apk/debug/app-debug.apk ${{ github.workspace }}/app/build/outputs/apk/debug/notable-next.apk
- name: Release
uses: softprops/action-gh-release@v1
with:
files: ${{ github.workspace }}/app/build/outputs/apk/debug/notable-next.apk
tag_name: next
name: next
prerelease: true
body: "Preview version built from branch: ${{ github.ref_name }}"
token: ${{ secrets.TOKEN }}