Add custom font import and fix font dropdown UX #140
This file contains hidden or 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: Nightly Build | |
| on: | |
| push: | |
| branches: | |
| - default | |
| paths-ignore: | |
| - '**.md' | |
| - 'screenshots/**' | |
| - '.github/dependabot.yml' | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: nightly-build | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build nightly APK | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Clone repo | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - name: Set up JDK environment | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: 21 | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v6.3.0 | |
| - name: Setup APK signing | |
| env: | |
| SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | |
| KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }} | |
| ALIAS: ${{ secrets.ALIAS }} | |
| KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
| run: | | |
| echo -n "$SIGNING_KEY" | base64 -d > app/storeFile.jks | |
| echo storeFile=storeFile.jks > custom.properties | |
| echo storePassword="$KEY_STORE_PASSWORD" >> custom.properties | |
| echo keyAlias="$ALIAS" >> custom.properties | |
| echo keyPassword="$KEY_PASSWORD" >> custom.properties | |
| - name: Remove local Java home from gradle.properties | |
| run: sed -i '/org\.gradle\.java\.home/d' gradle.properties | |
| - name: Build release APK | |
| run: ./gradlew assembleRelease -PlocalPropertiesFilePath=custom.properties | |
| - name: Set app version | |
| run: | | |
| echo "APP_VERSION=$(sed -n 's/^[[:space:]]*versionName = "\(.*\)"$/\1/p' app/build.gradle.kts | head -n 1)" >> "$GITHUB_ENV" | |
| - name: Set short SHA | |
| run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> "$GITHUB_ENV" | |
| - name: Collect APKs | |
| run: | | |
| mkdir -p release-artifacts | |
| find app/build/outputs/apk/release -maxdepth 1 -name '*.apk' \ | |
| -exec cp {} release-artifacts/ \; | |
| ls -lah release-artifacts | |
| - name: Build changelog and move nightly tag | |
| env: | |
| COMMIT_SHA: ${{ github.sha }} | |
| REF_NAME: ${{ github.ref_name }} | |
| run: | | |
| git fetch origin --tags --force | |
| # Baseline = latest *stable* tag (anything that isn't "nightly"). | |
| # This way the list accumulates across nightly builds and only | |
| # resets once a real release tag is cut. | |
| BASE_TAG=$(git tag --sort=-creatordate | grep -v -x 'nightly' | head -n1) | |
| { | |
| echo "⚠️ Automated build from the latest commit on the \`$REF_NAME\` branch / Автоматическая сборка из последнего коммита на ветке \`$REF_NAME\`." | |
| echo "Commit / Коммит: $COMMIT_SHA" | |
| echo "This is not a stable release and may contain bugs / Не является стабильным релизом — может содержать баги." | |
| echo "" | |
| echo "🗄️ Возможна миграция БД (Room). Сделайте бэкап перед обновлением — откат на старую версию может не сработать." | |
| echo "" | |
| if [ -n "$BASE_TAG" ]; then | |
| echo "## Changes since $BASE_TAG" | |
| git log --pretty=format:'- %s (%h)' "$BASE_TAG".."$COMMIT_SHA" | |
| else | |
| echo "## Recent changes" | |
| git log -20 --pretty=format:'- %s (%h)' "$COMMIT_SHA" | |
| fi | |
| echo "" | |
| } > release-body.md | |
| cat release-body.md | |
| # Now move the tag to the new commit so source archives stay in sync too | |
| git tag -f nightly "$COMMIT_SHA" | |
| git push origin nightly --force | |
| - name: Delete old nightly assets | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release view nightly --json assets --jq '.assets[].name' 2>/dev/null | \ | |
| xargs -r -I{} gh release delete-asset nightly "{}" --yes || true | |
| - name: Create/update nightly release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| name: NoveLA nightly v${{ env.APP_VERSION }} (${{ env.SHORT_SHA }}) | |
| tag_name: nightly | |
| target_commitish: ${{ github.sha }} | |
| prerelease: true | |
| draft: false | |
| body_path: release-body.md | |
| files: release-artifacts/*.apk |