This repository has been archived by the owner on Nov 12, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 886
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #558 from chrisbanes/cb/actions-cache-timout
GitHub Actions improvements
- Loading branch information
Showing
3 changed files
with
45 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,12 +15,20 @@ jobs: | |
ORG_GRADLE_PROJECT_TIVI_RELEASE_KEYSTORE_PWD: ${{ secrets.ORG_GRADLE_PROJECT_TIVI_RELEASE_KEYSTORE_PWD }} | ||
ORG_GRADLE_PROJECT_TIVI_RELEASE_KEY_PWD: ${{ secrets.ORG_GRADLE_PROJECT_TIVI_RELEASE_KEY_PWD }} | ||
ORG_GRADLE_PROJECT_TIVI_PLAY_PUBLISHER_ACCOUNT: ${{ secrets.ORG_GRADLE_PROJECT_TIVI_PLAY_PUBLISHER_ACCOUNT }} | ||
|
||
steps: | ||
- name: Generate build number | ||
shell: bash | ||
run: | | ||
echo "::set-env name=BUILD_NUMBER::$(expr $GITHUB_RUN_NUMBER + 5200)" | ||
- uses: actions/checkout@v2 | ||
|
||
- name: set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
|
||
- name: Decrypt secrets | ||
run: release/signing-setup.sh $ENCRYPT_KEY | ||
env: | ||
|
@@ -33,24 +41,15 @@ jobs: | |
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties | ||
|
||
- uses: actions/[email protected] | ||
timeout-minutes: 5 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('checksum.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Generate build number | ||
id: buildnumber | ||
uses: einaregilsson/build-number@v1 | ||
with: | ||
token: ${{secrets.GITHUB_TOKEN}} | ||
|
||
- name: Build debug and check | ||
run: ./gradlew spotlessCheck app:assembleDebug app:lintDebug testDebug dependencyUpdates -Ptivi.versioncode=$BUILD_NUMBER --scan | ||
|
||
- name: Build release | ||
if: github.ref != 'refs/heads/master' | ||
run: ./gradlew bundleRelease assembleRelease -Ptivi.versioncode=$BUILD_NUMBER --scan | ||
- name: Build and check | ||
run: ./gradlew spotlessCheck assembleDebug assembleRelease bundleRelease app:lintDebug testDebug -Ptivi.versioncode=$BUILD_NUMBER --scan | ||
|
||
- name: Publish to Play Store | ||
if: github.ref == 'refs/heads/master' | ||
|
@@ -84,12 +83,6 @@ jobs: | |
name: build-reports | ||
path: app/build/reports | ||
|
||
- name: Upload dependency updates report | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: dependency-updates | ||
path: build/dependencyUpdates | ||
|
||
- name: Copy test results | ||
if: always() | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Nightly tasks | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
|
||
env: | ||
TERM: dumb | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
|
||
- name: Copy CI gradle.properties | ||
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties | ||
|
||
- name: Check dependency updates | ||
run: ./gradlew dependencyUpdates | ||
|
||
- name: Upload dependency updates report | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: dependency-updates | ||
path: build/dependencyUpdates |