|
| 1 | +# Copyright 2025 Google LLC |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
1 | 15 | name: Release Please |
2 | 16 |
|
3 | 17 | on: |
|
17 | 31 | id: release |
18 | 32 | with: |
19 | 33 | token: ${{ secrets.SYNCED_GITHUB_TOKEN_REPO }} |
20 | | - |
21 | | - - uses: actions/checkout@v4 |
22 | | - if: ${{ steps.release.outputs.release_created }} |
23 | | - with: |
24 | | - token: ${{ secrets.SYNCED_GITHUB_TOKEN_REPO }} |
25 | | - |
26 | | - - uses: gradle/actions/wrapper-validation@v3 |
27 | | - if: ${{ steps.release.outputs.release_created }} |
28 | | - |
29 | | - - name: Create .gpg key |
30 | | - if: ${{ steps.release.outputs.release_created }} |
31 | | - run: | |
32 | | - echo $GPG_KEY_ARMOR | base64 --decode > ./release.asc |
33 | | - gpg --quiet --output $GITHUB_WORKSPACE/release.gpg --dearmor ./release.asc |
34 | | -
|
35 | | - echo "Build and publish" |
36 | | - sed -i -e "s,mavenCentralUsername=,mavenCentralUsername=$SONATYPE_USERNAME,g" gradle.properties |
37 | | - SONATYPE_PASSWORD_ESCAPED=$(printf '%s\n' "$SONATYPE_PASSWORD" | sed -e 's/[\/&]/\\&/g') |
38 | | - sed -i -e "s,mavenCentralPassword=,mavenCentralPassword=$SONATYPE_PASSWORD_ESCAPED,g" gradle.properties |
39 | | - sed -i -e "s,signing.keyId=,signing.keyId=$GPG_KEY_ID,g" gradle.properties |
40 | | - sed -i -e "s,signing.password=,signing.password=$GPG_PASSWORD,g" gradle.properties |
41 | | - sed -i -e "s,signing.secretKeyRingFile=,signing.secretKeyRingFile=$GITHUB_WORKSPACE/release.gpg,g" gradle.properties |
42 | | - env: |
43 | | - GPG_KEY_ARMOR: "${{ secrets.SYNCED_GPG_KEY_ARMOR }}" |
44 | | - GPG_KEY_ID: ${{ secrets.SYNCED_GPG_KEY_ID }} |
45 | | - GPG_PASSWORD: ${{ secrets.SYNCED_GPG_KEY_PASSWORD }} |
46 | | - SONATYPE_PASSWORD: ${{ secrets.SONATYPE_TOKEN_PASSWORD }} |
47 | | - SONATYPE_USERNAME: ${{ secrets.SONATYPE_TOKEN }} |
48 | | - |
49 | | - - name: Publish to Maven Central |
50 | | - if: ${{ steps.release.outputs.release_created }} |
51 | | - run: ./gradlew publishToMavenCentral |
52 | | - env: |
53 | | - ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_TOKEN }} |
54 | | - ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_TOKEN_PASSWORD }} |
| 34 | + config-file: release-please-config.json |
| 35 | + manifest-file: .release-please-manifest.json |
0 commit comments