5.7.0 #12
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: Release Java SDK | |
| on: | |
| release: | |
| types: [ published ] | |
| jobs: | |
| publish: | |
| name: Publish to Maven Central | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Maven Central Repository | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: maven | |
| server-id: ossrh | |
| server-username: MAVEN_USERNAME | |
| server-password: MAVEN_PASSWORD | |
| gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | |
| gpg-passphrase: GPG_PASSPHRASE | |
| - name: Publish package | |
| run: mvn --batch-mode -DskipTests=true deploy | |
| env: | |
| MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
| MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} | |
| GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
| send-email: | |
| name: Send release Email | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Decode configuration | |
| env: | |
| CONFIG: ${{ secrets.RELEASE_AUTOMATOR_BASE64_CONFIG }} | |
| run: | | |
| echo $CONFIG | base64 --decode > release.yaml | |
| - name: Run release-automator | |
| uses: unzerdev/unzer-tech-toolbox/.github/actions/release-changelog@main | |
| with: | |
| command: mail | |
| version: ${{github.ref_name}} | |
| generate-tweet: | |
| name: Generate tweet | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Decode configuration | |
| env: | |
| CONFIG: ${{ secrets.RELEASE_AUTOMATOR_BASE64_CONFIG }} | |
| run: | | |
| echo $CONFIG | base64 --decode > release.yaml | |
| - name: Run release-automator | |
| uses: unzerdev/unzer-tech-toolbox/.github/actions/release-changelog@main | |
| with: | |
| command: tweet | |
| version: ${{github.ref_name}} | |
| - name: Copy out tweet file | |
| run: | | |
| sudo cp target/tweet.txt tweet.txt | |
| - name: Attach release notes | |
| uses: actions/upload-artifact@v3 | |
| with: | |
| name: tweet | |
| path: tweet.txt | |
| retention-days: 5 |