This repository has been archived by the owner on Feb 3, 2024. It is now read-only.
chore(deps): update actions/cache action to v3 #476
Workflow file for this 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
# Making changes? https://github.com/nektos/act may help you test locally | |
name: Build And Test | |
on: [push, pull_request] | |
jobs: | |
build: | |
# Only run on PRs if the source branch is on someone else's repo | |
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.repository.full_name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
- name: Check out | |
uses: actions/checkout@v2 | |
- name: Setup JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- name: Cache Gradle packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | |
restore-keys: ${{ runner.os }}-gradle | |
- name: Build with Gradle | |
run: ./gradlew build | |
- name: Archive test results | |
uses: actions/upload-artifact@v2 | |
with: | |
name: test-results | |
path: | | |
build/test-results/test/ | |
*/build/test-results/test/ | |
platform/*/build/test-results/test | |
- name: Archive distributable plugins | |
uses: actions/upload-artifact@v2 | |
if: ${{ runner.os == 'Linux' }} # Only upload one set of artifacts | |
with: | |
name: PermissionsEx (all platforms) | |
path: build/libs/ | |
- name: Publish to Maven | |
if: ${{ runner.os == 'Linux' && github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
run: ./gradlew publish | |
env: | |
ORG_GRADLE_PROJECT_pexUsername: ${{ secrets.REPO_USERNAME }} | |
ORG_GRADLE_PROJECT_pexPassword: ${{ secrets.REPO_PASSWORD }} | |
ORG_GRADLE_PROJECT_stellardriftUsername: ${{ secrets.STELLARDRIFT_REPO_USER }} | |
ORG_GRADLE_PROJECT_stellardriftPassword: ${{ secrets.STELLARDRIFT_REPO_PASSWORD }} |