Merge pull request #14 from the-i-engineers/update-actions #30
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: Gradle CI | |
on: | |
push: | |
branches: [ 'develop', 'main' ] | |
tags: | |
- '*' | |
pull_request: | |
branches: [ develop ] | |
jobs: | |
ci: | |
name: ci | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK 17 | |
uses: actions/[email protected] | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: grant execute permission for gradlew on linux systems | |
if: runner.os == 'Linux' | |
run: chmod +x gradlew | |
- name: gradlew test | |
run: ./gradlew test --continue | |
- name: publish test reports | |
if: success() || failure() | |
uses: dorny/[email protected] | |
with: | |
name: test report | |
path: '**/build/test-results/test/TEST-*.xml' | |
reporter: java-junit | |
cd: | |
name: cd | |
runs-on: ubuntu-latest | |
needs: | |
- ci | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK 17 | |
uses: actions/[email protected] | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: grant execute permission for gradlew on linux systems | |
if: runner.os == 'Linux' | |
run: chmod +x gradlew | |
- name: build | |
run: ./gradlew publishPlugins -Pgradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }} -Pgradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }} |