Skip to content

Commit

Permalink
github-action: Cleanup ci steps
Browse files Browse the repository at this point in the history
  • Loading branch information
FireLord committed Jan 13, 2024
1 parent e88d526 commit 4946af6
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 39 deletions.
24 changes: 0 additions & 24 deletions .github/ci-gradle.properties

This file was deleted.

40 changes: 25 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Build release

on:
push:
branches: [ android ]
branches: [android]
pull_request:
branches: [ android ]
branches: [android]
paths:
- '.github/**'
- 'app/**'
Expand All @@ -17,22 +18,29 @@ jobs:
generate-release-build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"

env:
GRADLE_USER_HOME: ~/.gradle

steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Checkout repository
uses: actions/checkout@v2

- name: Decrypt secrets
run: release/signing-setup.sh "$ENCRYPT_KEY"
env:
ENCRYPT_KEY: ${{ secrets.ENCRYPT_KEY }}

- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
- name: Set up JDK
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '17'

- name: Cache Gradle dependencies
uses: actions/cache@v2
with:
path: |
${{ env.GRADLE_USER_HOME }}/caches
${{ env.GRADLE_USER_HOME }}/wrapper
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-${{ runner.os }}-
- name: Download gradle dependencies
run: ./gradlew dependencies
Expand All @@ -41,13 +49,15 @@ jobs:
run: ./gradlew :app:assembleRelease

- name: Send APK to Telegram
if: github.event_name == 'push' # Only execute for push events, not pull requests
run: release/deploy-telegram.sh
env:
TG_TO: ${{ secrets.TELEGRAM_TO }}
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
TG_FILE: ./app/build/outputs/apk/release/app-release.apk

- name: Send changelog to Telegram
if: github.event_name == 'push' # Only execute for push events, not pull requests
run: release/changelog-telegram.sh
env:
TG_TO: ${{ secrets.TELEGRAM_TO }}
Expand Down

0 comments on commit 4946af6

Please sign in to comment.