From b220571647b0cfb5a9159fc0b998989c4130f400 Mon Sep 17 00:00:00 2001 From: arkon Date: Tue, 7 Feb 2023 09:31:25 -0500 Subject: [PATCH] Update workflows (#8) --- .github/runner-files/ci-gradle.properties | 7 ------- .github/workflows/build_pull_request.yml | 19 +++++++------------ .github/workflows/build_push.yml | 21 ++++++++------------- .github/workflows/publish.yml | 19 +++++++------------ 4 files changed, 22 insertions(+), 44 deletions(-) delete mode 100644 .github/runner-files/ci-gradle.properties diff --git a/.github/runner-files/ci-gradle.properties b/.github/runner-files/ci-gradle.properties deleted file mode 100644 index 753351b..0000000 --- a/.github/runner-files/ci-gradle.properties +++ /dev/null @@ -1,7 +0,0 @@ -org.gradle.daemon=false -org.gradle.jvmargs=-Xmx5120m -org.gradle.workers.max=5 -org.gradle.parallel=true - -kotlin.incremental=false -kotlin.compiler.execution.strategy=in-process diff --git a/.github/workflows/build_pull_request.yml b/.github/workflows/build_pull_request.yml index 5967f4f..1a5317f 100644 --- a/.github/workflows/build_pull_request.yml +++ b/.github/workflows/build_pull_request.yml @@ -3,19 +3,18 @@ name: CI Pull Request on: pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} + cancel-in-progress: true + jobs: build: name: Build pull request runs-on: ubuntu-latest steps: - - name: Cancel previous runs - uses: styfle/cancel-workflow-action@0.9.0 - with: - access_token: ${{ github.token }} - - name: Checkout pull request - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.sha }} @@ -23,14 +22,10 @@ jobs: uses: gradle/wrapper-validation-action@v1 - name: Set up JDK - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: java-version: 11 - - - name: Copy CI gradle.properties - run: | - mkdir -p ~/.gradle - cp .github/runner-files/ci-gradle.properties ~/.gradle/gradle.properties + distribution: adopt - name: Generate android.jar run: | diff --git a/.github/workflows/build_push.yml b/.github/workflows/build_push.yml index 9b83be9..6e06c11 100644 --- a/.github/workflows/build_push.yml +++ b/.github/workflows/build_push.yml @@ -3,7 +3,11 @@ name: CI build on: push: branches: - - master + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: build: @@ -11,26 +15,17 @@ jobs: runs-on: ubuntu-latest steps: - - name: Cancel previous runs - uses: styfle/cancel-workflow-action@0.9.0 - with: - access_token: ${{ github.token }} - - name: Clone repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Validate Gradle Wrapper uses: gradle/wrapper-validation-action@v1 - name: Set up JDK - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: java-version: 11 - - - name: Copy CI gradle.properties - run: | - mkdir -p ~/.gradle - cp .github/runner-files/ci-gradle.properties ~/.gradle/gradle.properties + distribution: adopt - name: Generate android.jar run: | diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 406205c..5e70135 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,19 +5,18 @@ on: tags: - 'v*' +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: build: name: Build artifacts and create draft release runs-on: ubuntu-latest steps: - - name: Cancel previous runs - uses: styfle/cancel-workflow-action@0.9.0 - with: - access_token: ${{ github.token }} - - name: Checkout ${{ github.ref }} - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: ref: ${{ github.ref }} @@ -25,14 +24,10 @@ jobs: uses: gradle/wrapper-validation-action@v1 - name: Set up JDK - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: java-version: 11 - - - name: Copy CI gradle.properties - run: | - mkdir -p ~/.gradle - cp .github/runner-files/ci-gradle.properties ~/.gradle/gradle.properties + distribution: adopt - name: Generate android.jar run: |