Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wip: sign maven release artifacts with sigstore/cosign #6024

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/jreleaser.yml
Original file line number Diff line number Diff line change
@@ -6,6 +6,14 @@ on:
release-script-to-run:
required: true
type: string
attest-artifacts:
required: false
type: boolean
default: true # calling workflows can opt-out of attestation

permissions:
id-token: write # for verifying identity in attestation process
attestations: write # to push attestation

jobs:
jreleaser:
@@ -29,6 +37,12 @@ jobs:
JRELEASER_NEXUS2_MAVEN_CENTRAL_USERNAME: ${{ secrets.JRELEASER_NEXUS2_MAVEN_CENTRAL_USERNAME }}
JRELEASER_NEXUS2_MAVEN_CENTRAL_PASSWORD: ${{ secrets.JRELEASER_NEXUS2_MAVEN_CENTRAL_PASSWORD }}

- name: Sign artifacts with sigstore/cosign
if: inputs.attest-artifacts
uses: actions/attest-build-provenance@1c608d11d69870c2092266b3f9a6f3abbf17002c # v1.4.3
with:
subject-path: './target/staging-deploy/**/*.jar'

# Log failures
- name: JReleaser release output
if: always()
5 changes: 5 additions & 0 deletions .github/workflows/release-nightly.yml
Original file line number Diff line number Diff line change
@@ -3,10 +3,15 @@ name: Release nightly version
on:
schedule:
- cron: '0 0 * * *' # Every day at 00:00 UTC (https://crontab.guru/#0_0_*_*_*)
# For testing also allow it now...
pull_request:
branches:
- master

jobs:
nightly:
uses: ./.github/workflows/jreleaser.yml
with:
release-script-to-run: chore/release-nightly.sh
attest-artifacts: true
secrets: inherit