Improve presenter method resolving and disable cache #29
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: Build with Gradle | |
on: [push, pull_request] | |
jobs: | |
build: | |
# Only run on PRs if the source branch is on a different repo. We do not need to run everything twice. | |
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: gradle/actions/wrapper-validation@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
- name: Build with Gradle | |
run: | | |
chmod +x gradlew | |
./gradlew build -x test | |
- name: Create artifact name | |
id: vars | |
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: artifact-${{ steps.vars.outputs.sha_short }} | |
path: build/libs | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
- name: Upload release assets | |
uses: softprops/action-gh-release@v2 | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
with: | |
files: artifact-${{ steps.vars.outputs.sha_short }}/**.jar |