chore: uncommitted changes #25
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
name: Update Licenses and Build | |
on: [ | |
push, | |
pull_request | |
] | |
jobs: | |
update-license: | |
strategy: | |
matrix: | |
java: [ | |
17 | |
] | |
os: [ ubuntu-20.04 ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Enable Caching | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/loom-cache | |
~/.gradle/machete-build | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/gradle-wrapper.properties') }} | |
restore-keys: ${{ runner.os }}-gradle | |
- name: Get Branch Name | |
id: branch-name | |
uses: tj-actions/branch-names@v5 | |
- name: Validate Gradle Wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Setup JDK ${{ matrix.java }} | |
uses: actions/setup-java@v1 | |
with: | |
java-version: ${{ matrix.java }} | |
- name: Make Gradle Wrapper Executable | |
if: ${{ runner.os != 'Windows' }} | |
run: chmod +x ./gradlew | |
- name: Update Licenses | |
continue-on-error: true | |
run: | | |
./gradlew updateLicenses | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions" | |
git pull origin ${{ steps.branch-name.outputs.current_branch }} | |
git commit -m "Update License [Bot]" -a | |
- name: Push License Changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} | |
build: | |
needs: update-license | |
strategy: | |
matrix: | |
java: [ | |
17 | |
] | |
os: [ ubuntu-20.04 ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Enable Caching | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/loom-cache | |
~/.gradle/machete-build | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/gradle-wrapper.properties') }} | |
restore-keys: ${{ runner.os }}-gradle | |
- name: Get Branch Name | |
id: branch-name | |
uses: tj-actions/branch-names@v5 | |
- name: Validate Gradle Wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Setup JDK ${{ matrix.java }} | |
uses: actions/setup-java@v1 | |
with: | |
java-version: ${{ matrix.java }} | |
- name: Make Gradle Wrapper Executable | |
run: chmod +x ./gradlew | |
- name: Pull License Changes | |
run: git pull origin ${{ steps.branch-name.outputs.current_branch }} | |
- name: Build | |
run: ./gradlew build | |
- name: Capture Build Artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Artifacts | |
path: build/libs/ | |
- name: Capture Development Build Artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Artifacts (Dev) | |
path: build/devlibs/ |