Build and publish artifacts as a single step (#1679)

This avoids restoring gradle cache twice, thus speeding up the workflow
This commit is contained in:
Nikita Salnikov-Tarnovski 2020-11-19 17:20:17 +02:00 committed by GitHub
parent 80b068b459
commit 95083614a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 12 deletions

View File

@ -63,17 +63,12 @@ jobs:
# Trim whitespaces and cherrypick
echo $word | sed 's/ *$//g' | sed 's/^ *//g' | git cherry-pick --stdin
done
- uses: burrunan/gradle-cache-action@v1.5
with:
job-id: jdk11
remote-build-cache-proxy-enabled: false
arguments: build --stacktrace -Prelease.version=${{ github.event.inputs.version }}
- name: Publish artifacts
- name: Build and publish artifacts
uses: burrunan/gradle-cache-action@v1.5
with:
job-id: jdk11
remote-build-cache-proxy-enabled: false
arguments: final --stacktrace -Prelease.version=${{ github.event.inputs.version }}
arguments: build final --stacktrace -Prelease.version=${{ github.event.inputs.version }}
env:
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }}

View File

@ -16,15 +16,14 @@ jobs:
- uses: actions/setup-java@v1
with:
java-version: 11
- uses: burrunan/gradle-cache-action@v1.5
- name: Build and publish artifacts
uses: burrunan/gradle-cache-action@v1.5
with:
job-id: jdk11
remote-build-cache-proxy-enabled: false
arguments: build --stacktrace -Prelease.version=${{ github.event.inputs.version }}
- name: Publish artifacts
run: ./gradlew final --stacktrace -Prelease.version=${{ github.event.inputs.version }} --info
arguments: build final --stacktrace -Prelease.version=${{ github.event.inputs.version }}
env:
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }}
GRGIT_USER: ${{ github.actor }}
GRGIT_PASS: ${{ secrets.GITHUB_TOKEN }}
GRGIT_PASS: ${{ secrets.GITHUB_TOKEN }}