From 900f79551d29cbfc5ad920706e9c3b55795f3fad Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Thu, 25 Jun 2020 00:21:05 +0530 Subject: [PATCH 1/2] github: update actions for updated branching logic Signed-off-by: Harsh Shandilya (cherry picked from commit c9149a76631b1b6801555391bb5c435c1c24983f) Signed-off-by: Harsh Shandilya --- .github/workflows/branch_deploy.yml | 2 +- .github/workflows/deploy_snapshot.yml | 2 +- .github/workflows/draft_new_release.yml | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/branch_deploy.yml b/.github/workflows/branch_deploy.yml index 46f84ce067..76494f2a29 100644 --- a/.github/workflows/branch_deploy.yml +++ b/.github/workflows/branch_deploy.yml @@ -1,7 +1,7 @@ on: push: branches-ignore: - - master + - develop paths: - '.github/**' - 'app/**' diff --git a/.github/workflows/deploy_snapshot.yml b/.github/workflows/deploy_snapshot.yml index 55086c17df..e34e41bf52 100644 --- a/.github/workflows/deploy_snapshot.yml +++ b/.github/workflows/deploy_snapshot.yml @@ -1,7 +1,7 @@ on: push: branches: - - master + - develop name: Deploy snapshot builds jobs: diff --git a/.github/workflows/draft_new_release.yml b/.github/workflows/draft_new_release.yml index f83afe61f8..d45f200a30 100644 --- a/.github/workflows/draft_new_release.yml +++ b/.github/workflows/draft_new_release.yml @@ -10,6 +10,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + with: + ref: 'release' - name: Extract version from milestone run: | VERSION="${{ github.event.milestone.title }}" @@ -41,5 +43,5 @@ jobs: with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} head: release/${{ env.RELEASE_VERSION }} - base: master + base: release title: Release ${{ env.RELEASE_VERSION }} From 15df1dcf4b5d2b5171798ca9ad35693203621937 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sun, 28 Jun 2020 21:28:24 +0530 Subject: [PATCH 2/2] Rework GitHub Actions (#893) (cherry picked from commit a3eaefa50dc87f208a11e077697f0f4f50674fa0) Signed-off-by: Harsh Shandilya --- .github/workflows/branch_deploy.yml | 72 ------------------------- .github/workflows/draft_new_release.yml | 6 +-- 2 files changed, 3 insertions(+), 75 deletions(-) delete mode 100644 .github/workflows/branch_deploy.yml diff --git a/.github/workflows/branch_deploy.yml b/.github/workflows/branch_deploy.yml deleted file mode 100644 index 76494f2a29..0000000000 --- a/.github/workflows/branch_deploy.yml +++ /dev/null @@ -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 diff --git a/.github/workflows/draft_new_release.yml b/.github/workflows/draft_new_release.yml index d45f200a30..0e91926b1e 100644 --- a/.github/workflows/draft_new_release.yml +++ b/.github/workflows/draft_new_release.yml @@ -18,7 +18,7 @@ jobs: echo "::set-env name=RELEASE_VERSION::$VERSION" - name: Create release branch - run: git checkout -b release/${{ env.RELEASE_VERSION }} + run: git checkout -b release-${{ env.RELEASE_VERSION }} - name: Update changelog uses: thomaseizinger/keep-a-changelog-new-release@1.1.0 @@ -36,12 +36,12 @@ jobs: git commit --message "Prepare release ${{ env.RELEASE_VERSION }}" - name: Push new branch - run: git push origin release/${{ env.RELEASE_VERSION }} + run: git push origin release-${{ env.RELEASE_VERSION }} - name: Create pull request uses: thomaseizinger/create-pull-request@1.0.0 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - head: release/${{ env.RELEASE_VERSION }} + head: release-${{ env.RELEASE_VERSION }} base: release title: Release ${{ env.RELEASE_VERSION }}