I love fixing CI #24
This file contains hidden or 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: Java CI with Gradle | |
| on: | |
| push: | |
| branches: [ "new" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: 'gradle' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 # v4.0.0 | |
| - name: Make ./gradlew executable | |
| run: chmod +x ./gradlew | |
| - name: Build with Gradle Wrapper | |
| run: ./gradlew build | |
| - name: Test | |
| run: ./gradlew test | |
| # Publish to GitHub Packages | |
| - name: Publish to GitHub Packages | |
| run: ./gradlew :api:publish | |
| env: | |
| GITHUB_ACTOR: ${{ github.actor }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| dependency-submission: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: 'gradle' | |
| # Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies. | |
| # See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md | |
| - name: Generate and submit dependency graph | |
| uses: gradle/actions/dependency-submission@v4 # v4.0.0 |