Skip to content

Commit

Permalink
Update & improve gradle.yml workflow
Browse files Browse the repository at this point in the history
Note: Removes release check and lets it always build.
  • Loading branch information
Ampflower committed Jun 27, 2022
1 parent a1c10d2 commit 4136465
Showing 1 changed file with 26 additions and 10 deletions.
36 changes: 26 additions & 10 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,45 @@
name: build
on:
push:
tags-ignore:
- '**'
branches:
- '**'
paths-ignore:
- '.github/**'
- '!.github/workflows/**'
- '**.md'
- 'python_scripts/**'
workflow_dispatch:

jobs:
build:
if: "contains(toJSON(github.event.commits.*.message), '[release]')"
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: cache gradle
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: setup jdk 17
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: make gradle wrapper executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: build
run: ./gradlew build
run: ./gradlew build --no-daemon
- name: capture build artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: Artifacts
path: build/libs/
path: build/libs/

0 comments on commit 4136465

Please sign in to comment.