Skip to content

bump up to v0.4.0, add changelog (#506) #4

bump up to v0.4.0, add changelog (#506)

bump up to v0.4.0, add changelog (#506) #4

Workflow file for this run

name: Build Java Release
on:
push:
tags:
# if you change this pattern, make sure jobs.strip-tag still works
- 'release/java/v[0-9]+.[0-9]+.[0-9]+'
permissions: {}
jobs:
ci:

Check failure on line 11 in .github/workflows/java-release.yml

View workflow run for this annotation

GitHub Actions / Build Java Release

Invalid workflow file

The workflow is not valid. .github/workflows/java-release.yml (Line: 11, Col: 3): Error calling workflow 'sigstore/protobuf-specs/.github/workflows/java-build.yml@68cc7d273f0a2ade2f8c9c56c0da094f481eabd5'. The workflow is requesting 'contents: read', but is only allowed 'contents: none'.
uses: ./.github/workflows/java-build.yml
strip-tag:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- name: process tag
id: version
env:
TAG: ${{ github.ref_name }}
run: |
echo "version=${TAG#"release/java/v"}" >> $GITHUB_OUTPUT
build:
runs-on: ubuntu-latest
needs: [ci, strip-tag]
permissions:
id-token: write # to sign with sigstore
steps:
- name: checkout tag
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Set up JDK 11
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
with:
java-version: 11
distribution: 'temurin'
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@6fc4af4b145ae7821d527454aa9bd537d1f2dc5f # v0.8.1
with:
workload_identity_provider: projects/306323169285/locations/global/workloadIdentityPools/github-actions-pool/providers/github-actions-provider
service_account: [email protected]
- uses: google-github-actions/get-secretmanager-secrets@e5bb06c2ca53b244f978d33348d18317a7f263ce # v2.2.2
id: secrets
with:
secrets: |-
signing_key:sigstore-secrets/sigstore-java-pgp-priv-key
signing_password:sigstore-secrets/sigstore-java-pgp-priv-key-password
sonatype_username:sigstore-secrets/sigstore-java-sonatype-username
sonatype_password:sigstore-secrets/sigstore-java-sonatype-password
- name: Build, Sign and Push to Maven Central
# TODO: someone still needs to close and release this, but that can be automated next
working-directory: ./java
env:
VERSION: ${{ needs.strip-tag.outputs.version }}
ORG_GRADLE_PROJECT_signingKey: ${{ steps.secrets.outputs.signing_key }}
ORG_GRADLE_PROJECT_signingPassword: ${{ steps.secrets.outputs.signing_password }}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ steps.secrets.outputs.sonatype_username }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ steps.secrets.outputs.sonatype_password }}
run: |
./gradlew clean :publishProtoPublicationToSonatypeRepository -Pversion=${VERSION} -Prelease