Skip to content

Commit

Permalink
Update CI actions to remove deprecated set-env, new apk signing action
Browse files Browse the repository at this point in the history
Removing set-env due to the vunerability mentioned by Github here:
https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
  • Loading branch information
abhijitvalluri committed Oct 13, 2020
1 parent dca8a2f commit 2c98a87
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 36 deletions.
Expand Up @@ -4,7 +4,7 @@ on:
types: [opened]
branches:
- fork
jobs:
jobs: # Disabled because we cannot build changes from fork PRs using this repo's secrets due to Github limitations. So, the built apk will be from wrong code, so this is pointless.
comment-on-pr:
runs-on: ubuntu-latest
if: "! contains(toJSON(github.event.pull_request.title), '[skip ci]')"
Expand Down
30 changes: 1 addition & 29 deletions .github/workflows/android-build-pr.yml
Expand Up @@ -17,42 +17,14 @@ jobs:
with:
java-version: 11
- name: Create version name
run: echo "::set-env name=VERSION_NAME::$(git describe --tags HEAD)"
run: echo "VERSION_NAME=$(git describe --tags HEAD)" >> $GITHUB_ENV
- name: Build forkRelease variant of app
uses: eskatos/gradle-command-action@v1
with:
wrapper-cache-enabled: true
dependencies-cache-enabled: true
configuration-cache-enabled: true
arguments: assembleForkRelease -PversionName=${{ env.VERSION_NAME }}
- name: Create signed APKs
uses: abhijitvalluri/sign-apks@v0.6
with:
releaseDirectory: app/build/outputs/apk/forkRelease/
signingKeyBase64: ${{ secrets.DEBUG_SIGNING_KEY }}
alias: ${{ secrets.DEBUG_ALIAS }}
keyStorePassword: ${{ secrets.DEBUG_KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.DEBUG_KEY_PASSWORD }}
- name: Archive arm64 apk
uses: actions/upload-artifact@v2
with:
name: app-arm64-v8a-forkRelease.apk
path: app/build/outputs/apk/forkRelease/app-arm64-v8a-forkRelease.apk
- name: Archive armeabi apk
uses: actions/upload-artifact@v2
with:
name: app-armeabi-v7a-forkRelease.apk
path: app/build/outputs/apk/forkRelease/app-armeabi-v7a-forkRelease.apk
- name: Archive x86 apk
uses: actions/upload-artifact@v2
with:
name: app-x86-forkRelease.apk
path: app/build/outputs/apk/forkRelease/app-x86-forkRelease.apk
- name: Archive x86_64 apk
uses: actions/upload-artifact@v2
with:
name: app-x86_64-forkRelease.apk
path: app/build/outputs/apk/forkRelease/app-x86_64-forkRelease.apk


run-testDebug:
Expand Down
24 changes: 22 additions & 2 deletions .github/workflows/android-build.yml
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
java-version: 11
- name: Create version name
run: echo "::set-env name=VERSION_NAME::$(git describe --tags HEAD)"
run: echo "VERSION_NAME=$(git describe --tags HEAD)" >> $GITHUB_ENV
- name: Build forkRelease variant of app
uses: eskatos/gradle-command-action@v1
with:
Expand All @@ -26,13 +26,33 @@ jobs:
configuration-cache-enabled: true
arguments: assembleForkRelease -PversionName=${{ env.VERSION_NAME }}
- name: Create signed APKs
uses: abhijitvalluri/sign-apks@v0.6
uses: abhijitvalluri/sign-apks@v0.8
with:
releaseDirectory: app/build/outputs/apk/forkRelease/
signingKeyBase64: ${{ secrets.DEBUG_SIGNING_KEY }}
alias: ${{ secrets.DEBUG_ALIAS }}
keyStorePassword: ${{ secrets.DEBUG_KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.DEBUG_KEY_PASSWORD }}
- name: Archive arm64 apk
uses: actions/upload-artifact@v2
with:
name: app-arm64-v8a-forkRelease.apk
path: app/build/outputs/apk/forkRelease/app-arm64-v8a-forkRelease.apk
- name: Archive armeabi apk
uses: actions/upload-artifact@v2
with:
name: app-armeabi-v7a-forkRelease.apk
path: app/build/outputs/apk/forkRelease/app-armeabi-v7a-forkRelease.apk
- name: Archive x86 apk
uses: actions/upload-artifact@v2
with:
name: app-x86-forkRelease.apk
path: app/build/outputs/apk/forkRelease/app-x86-forkRelease.apk
- name: Archive x86_64 apk
uses: actions/upload-artifact@v2
with:
name: app-x86_64-forkRelease.apk
path: app/build/outputs/apk/forkRelease/app-x86_64-forkRelease.apk


run-testDebug:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/release-automation.yml
Expand Up @@ -15,17 +15,15 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: 11
- name: Create version name
run: echo "::set-env name=VERSION_NAME::$(git describe --tags HEAD)"
- name: Build forkRelease variant of app
uses: eskatos/gradle-command-action@v1
with:
wrapper-cache-enabled: true
dependencies-cache-enabled: true
configuration-cache-enabled: true
arguments: assembleForkRelease -PversionName=${{ env.VERSION_NAME }}
arguments: assembleForkRelease -PversionName=${{ github.event.ref }}
- name: Create signed APKs
uses: abhijitvalluri/sign-apks@v0.6
uses: abhijitvalluri/sign-apks@v0.8
with:
releaseDirectory: app/build/outputs/apk/forkRelease/
signingKeyBase64: ${{ secrets.DEBUG_SIGNING_KEY }}
Expand Down

0 comments on commit 2c98a87

Please sign in to comment.