diff --git a/.github/workflows/changeset.yml b/.github/workflows/changeset.yml index d0096a6..5634810 100644 --- a/.github/workflows/changeset.yml +++ b/.github/workflows/changeset.yml @@ -1,9 +1,7 @@ name: Changeset on: push: - branches: - - main - - ullrich/add-changesets + branches: [ "main" ] concurrency: ${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/release-gradle-publish.yml b/.github/workflows/release-gradle-publish.yml new file mode 100644 index 0000000..97b9a14 --- /dev/null +++ b/.github/workflows/release-gradle-publish.yml @@ -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 \ No newline at end of file