Publish Snapshot to GitHub Packages #127
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: Publish Snapshot to GitHub Packages | |
on: | |
workflow_run: | |
workflows: [Scans] | |
branches: [main] | |
types: [completed] | |
jobs: | |
publish-to-github-packages: | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: temurin | |
- name: Validate Gradle wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Publish Snapshot to GitHub Packages | |
run: ./gradlew publishAllPublicationsToGithubPackagesRepository | |
env: | |
ORG_GRADLE_PROJECT_githubActor: ${{ github.actor }} | |
ORG_GRADLE_PROJECT_githubToken: ${{ github.token }} |