Rework GitHub Actions (#893)
This commit is contained in:
parent
535ad1dbb1
commit
a3eaefa50d
2 changed files with 3 additions and 75 deletions
72
.github/workflows/branch_deploy.yml
vendored
72
.github/workflows/branch_deploy.yml
vendored
|
@ -1,72 +0,0 @@
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches-ignore:
|
|
||||||
- develop
|
|
||||||
paths:
|
|
||||||
- '.github/**'
|
|
||||||
- 'app/**'
|
|
||||||
- 'gradle/**'
|
|
||||||
- '*.properties'
|
|
||||||
- '*.gradle'
|
|
||||||
- 'gradlew'
|
|
||||||
- 'gradlew.bat'
|
|
||||||
|
|
||||||
name: Build debug
|
|
||||||
jobs:
|
|
||||||
generate-debug-build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: "!contains(github.event.head_commit.message, '[ci skip]')"
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v1
|
|
||||||
|
|
||||||
- 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: Generate cache key
|
|
||||||
run: ./.github/checksum.sh checksum.txt
|
|
||||||
|
|
||||||
- name: Cache gradle modules
|
|
||||||
uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ~/.gradle/caches/modules-2
|
|
||||||
key: ${{ runner.os }}-gradlemodules-${{ hashFiles('checksum.txt') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-gradlemodules-
|
|
||||||
|
|
||||||
- name: Cache gradle jars
|
|
||||||
uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ~/.gradle/caches/jars-3
|
|
||||||
key: ${{ runner.os }}-gradlejars-${{ hashFiles('checksum.txt') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-gradlejars-
|
|
||||||
|
|
||||||
- name: Cache gradle build
|
|
||||||
uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ~/.gradle/caches/build-cache-1
|
|
||||||
key: ${{ runner.os }}-gradlebuildcache-${{ hashFiles('checksum.txt') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-gradlebuildcache-
|
|
||||||
|
|
||||||
- name: Download gradle dependencies
|
|
||||||
run: ./gradlew dependencies
|
|
||||||
|
|
||||||
- name: Build debug app
|
|
||||||
run: ./gradlew :app:assembleDebug
|
|
||||||
|
|
||||||
- name: Clean secrets
|
|
||||||
run: release/signing-cleanup.sh
|
|
||||||
|
|
||||||
- name: Send APK to Telegram
|
|
||||||
run: release/deploy-telegram.sh
|
|
||||||
env:
|
|
||||||
TG_TO: ${{ secrets.TELEGRAM_TO }}
|
|
||||||
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
|
|
||||||
TG_FILE: ./app/build/outputs/apk/debug/app-debug.apk
|
|
6
.github/workflows/draft_new_release.yml
vendored
6
.github/workflows/draft_new_release.yml
vendored
|
@ -18,7 +18,7 @@ jobs:
|
||||||
echo "::set-env name=RELEASE_VERSION::$VERSION"
|
echo "::set-env name=RELEASE_VERSION::$VERSION"
|
||||||
|
|
||||||
- name: Create release branch
|
- name: Create release branch
|
||||||
run: git checkout -b release/${{ env.RELEASE_VERSION }}
|
run: git checkout -b release-${{ env.RELEASE_VERSION }}
|
||||||
|
|
||||||
- name: Update changelog
|
- name: Update changelog
|
||||||
uses: thomaseizinger/keep-a-changelog-new-release@1.1.0
|
uses: thomaseizinger/keep-a-changelog-new-release@1.1.0
|
||||||
|
@ -36,12 +36,12 @@ jobs:
|
||||||
git commit --message "Prepare release ${{ env.RELEASE_VERSION }}"
|
git commit --message "Prepare release ${{ env.RELEASE_VERSION }}"
|
||||||
|
|
||||||
- name: Push new branch
|
- name: Push new branch
|
||||||
run: git push origin release/${{ env.RELEASE_VERSION }}
|
run: git push origin release-${{ env.RELEASE_VERSION }}
|
||||||
|
|
||||||
- name: Create pull request
|
- name: Create pull request
|
||||||
uses: thomaseizinger/create-pull-request@1.0.0
|
uses: thomaseizinger/create-pull-request@1.0.0
|
||||||
with:
|
with:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
head: release/${{ env.RELEASE_VERSION }}
|
head: release-${{ env.RELEASE_VERSION }}
|
||||||
base: release
|
base: release
|
||||||
title: Release ${{ env.RELEASE_VERSION }}
|
title: Release ${{ env.RELEASE_VERSION }}
|
||||||
|
|
Loading…
Reference in a new issue