Bump version to 2.17.0 #345
Workflow file for this run
This file contains hidden or 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
| name: Publish to GitHub Packages | |
| on: | |
| pull_request: | |
| types: | |
| - closed | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| jobs: | |
| publish-github: | |
| if: | | |
| github.event_name == 'workflow_dispatch' || | |
| ( | |
| github.event_name == 'pull_request' && | |
| github.event.pull_request.merged == true && | |
| startsWith(github.event.pull_request.head.ref, 'release/') | |
| ) | |
| runs-on: ubuntu-latest | |
| permissions: write-all | |
| steps: | |
| - name: Generate GitHub App token | |
| id: app-token | |
| uses: actions/create-github-app-token@v1 | |
| with: | |
| app-id: ${{ vars.PUBLISHER_ID }} | |
| private-key: ${{ secrets.PUBLISHER_SECRET }} | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ steps.app-token.outputs.token }} | |
| - name: Set up Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: 22 | |
| distribution: 'zulu' | |
| - name: Set up Gradle | |
| uses: gradle/actions/setup-gradle@v3 | |
| with: | |
| gradle-version: 8.8 | |
| - name: Decode signing key file | |
| uses: timheuer/base64-to-file@v1.2 | |
| with: | |
| fileName: com.rees46.key.gpg | |
| fileDir: ./personalization-sdk | |
| encodedString: ${{ secrets.SIGNING_KEY_FILE_AS_BASE64_STRING }} | |
| - name: Configure gradle.properties for GitHub Packages | |
| run: | | |
| echo "ossrhUsername=${{ github.repository_owner }}" >> gradle.properties | |
| echo "ossrhPassword=${{ steps.app-token.outputs.token }}" >> gradle.properties | |
| echo "signing_keyId=${{ secrets.SIGNING_KEY_ID }}" >> gradle.properties | |
| echo "signing_password=${{ secrets.SIGNING_PASSWORD }}" >> gradle.properties | |
| echo "signing_secretKeyRingFile=com.rees46.key.gpg" >> gradle.properties | |
| echo "variantName=${{ vars.REES_VARIANT_NAME }}" >> gradle.properties | |
| echo "url=${{ vars.REES_REPO_URL }}" >> gradle.properties | |
| echo "publishUrl=https://maven.pkg.github.com/${{ github.repository }}" >> gradle.properties | |
| ESCAPED_KEY=$(echo "${{ secrets.SIGNING_KEY_FILE_AS_BASE64_STRING }}" | awk '{printf "%s\\n", $0}' | tr -d '\n') | |
| echo "signing_key=$ESCAPED_KEY" >> gradle.properties | |
| echo "Updated gradle.properties for GitHub Packages" | |
| - name: Clean | |
| run: ./gradlew clean | |
| - name: Publish to GitHub Packages | |
| env: | |
| GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} | |
| run: ./gradlew publishToGitHubPackages |