Prepare for release outie 0.2.2 (#131) #30
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 Maven Central | |
| on: | |
| push: | |
| tags: | |
| - 'common-v*' | |
| - 'innie-v*' | |
| - 'outie-v*' | |
| - 'outie-jooq-provider-v*' | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - name: Check if tag is on main branch | |
| id: check-branch | |
| run: | | |
| if git branch -r --contains ${{ github.ref }} | grep -q "origin/main"; then | |
| echo "tag_on_main=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "tag_on_main=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Set up JDK | |
| if: steps.check-branch.outputs.tag_on_main == 'true' | |
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 | |
| with: | |
| java-version: '11' | |
| distribution: 'temurin' | |
| - name: Extract module and version from tag | |
| if: steps.check-branch.outputs.tag_on_main == 'true' | |
| id: parse-tag | |
| run: | | |
| TAG="${GITHUB_REF#refs/tags/}" | |
| MODULE="${TAG%-v*}" | |
| VERSION="${TAG#*-v}" | |
| echo "module=$MODULE" >> $GITHUB_OUTPUT | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Publish to Maven Central | |
| if: steps.check-branch.outputs.tag_on_main == 'true' | |
| env: | |
| ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_CENTRAL_USERNAME }} | |
| ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_CENTRAL_PASSWORD }} | |
| ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_SECRET_KEY }} | |
| ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_SECRET_PASSPHRASE }} | |
| ORG_GRADLE_PROJECT_VERSION_NAME: ${{ steps.parse-tag.outputs.version }} | |
| run: bin/gradle :${{ steps.parse-tag.outputs.module }}:publishToMavenCentral |