Add SLSA 3 Provenance #313
Workflow file for this run
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: Build, Release, and Generate SLSA Provenance | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write # Required for publishing | |
| packages: write | |
| actions: read | |
| id-token: write # Required for OIDC provenance signing | |
| jobs: | |
| # Build and generate SLSA 3 provenance | |
| slsa-build: | |
| uses: slsa-framework/slsa-github-generator/.github/workflows/builder_gradle_slsa3.yml@v2.1.0 | |
| with: | |
| artifact-list: > | |
| pi4micronaut-utils/build/libs/*.jar | |
| permissions: | |
| id-token: write | |
| contents: read | |
| actions: read | |
| # Publish the library (after SLSA build) | |
| publish-jar: | |
| runs-on: ubuntu-latest | |
| needs: slsa-build | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| cache: gradle | |
| - name: Change wrapper permissions | |
| run: chmod +x pi4micronaut-utils/gradlew | |
| - name: Publish Library | |
| working-directory: pi4micronaut-utils | |
| env: | |
| SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
| SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
| GPG_KEY: ${{ secrets.GPG_KEY }} | |
| GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }} | |
| run: ./gradlew clean publish --info |