Skip to content

Commit

Permalink
Use gradle action to execute commands
Browse files Browse the repository at this point in the history
  • Loading branch information
AChep committed Feb 7, 2021
1 parent eada4dc commit 95c2781
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 69 deletions.
22 changes: 8 additions & 14 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ jobs:
uses: metcalfc/[email protected]
with:
myToken: ${{ secrets.GITHUB_TOKEN }}
- name: set up JDK 1.8
- name: "Setup JDK 11"
id: setup-java
uses: actions/setup-java@v1
with:
java-version: 1.8
java-version: "11"
- id: vars
run: |
echo ::set-output name=tag::${GITHUB_REF:10}
Expand All @@ -35,19 +36,12 @@ jobs:
echo ${{ secrets.GOOGLE_SERVICES }} | base64 -d | zcat >> app/google-services.json
echo ${{ secrets.KEYSTORE_B64 }} | base64 -d | zcat >> app/pocketmode-release.keystore
echo ${{ secrets.KEYSTORE_PROPS_B64 }} | base64 -d | zcat >> app/pocketmode-release.properties
- name: Generate cache key
run: ./checksum.sh . checksum.txt
- uses: actions/cache@v2
- name: "./gradlew clean bundlePlaystoreRelease assemblePlaystoreRelease assembleOpensourceRelease"
uses: eskatos/gradle-command-action@v1
env:
JAVA_HOME: ${{ steps.setup-java.outputs.path }}
with:
path: |
~/.gradle/caches/modules-*
~/.gradle/caches/jars-*
~/.gradle/caches/build-cache-*
key: gradle-${{ hashFiles('checksum.txt') }}
- name: build with Gradle
run: ./gradlew clean bundlePlaystoreRelease assemblePlaystoreRelease
- name: build with Gradle [oss]
run: ./gradlew assembleOpensourceRelease
arguments: clean bundlePlaystoreRelease assemblePlaystoreRelease assembleOpensourceRelease
- name: create release
id: create_release
uses: actions/create-release@v1
Expand Down
20 changes: 8 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,19 @@ jobs:

steps:
- uses: actions/checkout@master
- name: Set up JDK 1.8
- name: "Setup JDK 11"
id: setup-java
uses: actions/setup-java@v1
with:
java-version: 1.8
java-version: "11"
- name: Copy google-services.json
run: |
cd app
echo ${{ secrets.GOOGLE_SERVICES }} | base64 -d | zcat >> google-services.json
cd ..
- name: Generate cache key
run: ./checksum.sh . checksum.txt
- uses: actions/cache@v2
- name: "./gradlew assemblePlaystoreDebug"
uses: eskatos/gradle-command-action@v1
env:
JAVA_HOME: ${{ steps.setup-java.outputs.path }}
with:
path: |
~/.gradle/caches/modules-*
~/.gradle/caches/jars-*
~/.gradle/caches/build-cache-*
key: gradle-${{ hashFiles('checksum.txt') }}
- name: Run tests
run: ./gradlew assemblePlaystoreDebug
arguments: assemblePlaystoreDebug
43 changes: 0 additions & 43 deletions checksum.sh

This file was deleted.

0 comments on commit 95c2781

Please sign in to comment.