Merge pull request #211 from Backblaze/6.5.0-release-changes #13
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
| # Copyright 2022, Backblaze Inc. All Rights Reserved. | |
| # License https://www.backblaze.com/using_b2_code.html | |
| name: b2-sdk-java Maven Central deployment | |
| on: | |
| push: | |
| tags: ['v*'] | |
| jobs: | |
| deploy: | |
| name: Deploy | |
| if: github.repository == 'Backblaze/b2-sdk-java' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '11' | |
| - uses: gradle/actions/wrapper-validation@v4 | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Deploy to Maven Central | |
| run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository createBundle --no-daemon --stacktrace | |
| env: | |
| RELEASE_BUILD: true | |
| GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} | |
| GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
| ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }} | |
| ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }} | |
| - name: Get tag name | |
| id: get_tag | |
| shell: bash | |
| run: | | |
| tag_name="$(echo $GITHUB_REF | cut -d / -f 3)" | |
| echo ::set-output name=tag::$tag_name | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ steps.get_tag.outputs.tag }} | |
| name: ${{ steps.get_tag.outputs.tag }} | |
| prerelease: false | |
| draft: false | |
| files: | | |
| core/build/libs/bundle-*.jar | |
| httpclient/build/libs/bundle-*.jar | |
| samples/build/libs/bundle-*.jar |