-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automate Publishing to Maven Central via CI (#29)
* Adding Publish workflow * Remove testing branch from Changesets workflow
- Loading branch information
Showing
2 changed files
with
58 additions
and
3 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Release Gradle Publish | ||
|
||
on: | ||
release: | ||
types: [ created ] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
|
||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v4 | ||
|
||
- name: Setup Keyring | ||
id: keyring | ||
env: | ||
KEYRING_FILE: ${{ runner.temp }}/publish-keyring.gpg | ||
DATA: ${{ secrets.SIGNING_KEYRING }} | ||
run: | | ||
echo "Creating Keyring file at $KEYRING_FILE" | ||
echo $DATA | base64 -di > $KEYRING_FILE | ||
echo "keyringFile=$KEYRING_FILE" >> "$GITHUB_OUTPUT" | ||
- name: Sanity Check | ||
run: | | ||
./gradlew \ | ||
sdk:lint sdk-compose:lint \ | ||
sdk:test sdk-compose:test | ||
- name: Publish to Maven Local | ||
run: | | ||
./gradlew \ | ||
-Psigning.keyId="${{ secrets.SIGNING_KEYID }}" \ | ||
-Psigning.password="${{ secrets.SIGNING_PASSWORD }}" \ | ||
-Psigning.secretKeyRingFile="${{ steps.keyring.outputs.keyringFile }}" \ | ||
sdk:publishToMavenLocal sdk-compose:publishToMavenLocal | ||
- name: Publish to Maven | ||
run: | | ||
./gradlew \ | ||
-Psigning.keyId="${{ secrets.SIGNING_KEYID }}" \ | ||
-Psigning.password="${{ secrets.SIGNING_PASSWORD }}" \ | ||
-Psigning.secretKeyRingFile="${{ steps.keyring.outputs.keyringFile }}" \ | ||
-PNEXUS_USERNAME="${{ secrets.NEXUS_USERNAME }}" \ | ||
-PNEXUS_PASSWORD="${{ secrets.NEXUS_PASSWORD }}" \ | ||
sdk:publish sdk-compose:publish |