Skip to content

Merge pull request #19 from mbeddr/refactor/updateGithubActionsVersions #61

Merge pull request #19 from mbeddr/refactor/updateGithubActionsVersions

Merge pull request #19 from mbeddr/refactor/updateGithubActionsVersions #61

Workflow file for this run

# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Java CI with Gradle
on: [push]
jobs:
test-packaging:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
- name: Test packaging
run: ./gradlew testPackaging
publish:
runs-on: ubuntu-latest
needs: test-packaging
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/mps/')
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Publish to Github Packages
run: ./gradlew publishAllPublicationsToGitHubPackagesRepository -Pgpr.user=${{github.actor}} -Pgpr.token=${{ secrets.GITHUB_TOKEN }}