chore(main): release dev.openfeature.contrib.providers.env-var 0.0.12… #3
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
| on: | |
| push: | |
| branches: | |
| - main | |
| name: Run Release Please | |
| jobs: | |
| release-please: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # for googleapis/release-please-action to create release commit | |
| pull-requests: write # for googleapis/release-please-action to create release PR | |
| issues: write # for googleapis/release-please-action to create labels | |
| # Release-please creates a PR that tracks all changes | |
| steps: | |
| - uses: googleapis/release-please-action@c2a5a2bd6a758a0937f1ddb1e8950609867ed15c # v4 | |
| id: release | |
| with: | |
| token: ${{secrets.RELEASE_PLEASE_ACTION_TOKEN}} | |
| outputs: | |
| release_created: ${{ fromJSON(steps.release.outputs.paths_released)[0] != null }} # if we have a single release path, do the release | |
| publish: | |
| environment: publish | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| needs: release-please | |
| if: ${{ fromJSON(needs.release-please.outputs.release_created || false) }} | |
| steps: | |
| # The logic below handles the maven publication: | |
| - name: Checkout Repository | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| with: | |
| submodules: recursive | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| cache: maven | |
| server-id: central | |
| server-username: CENTRAL_USERNAME | |
| server-password: CENTRAL_PASSWORD | |
| - name: Cache local Maven repository | |
| uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4 | |
| with: | |
| path: ~/.m2/repository | |
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-maven- | |
| - name: Configure GPG Key | |
| run: | | |
| echo -n "$GPG_SIGNING_KEY" | base64 --decode | gpg --import | |
| env: | |
| GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} | |
| # Release Please has already incremented versions and published tags, so we just need to publish (skip tests). | |
| - name: Maven Verify Deploy -DskipTests -Dcheckstyle.skip | |
| # The nexus-staging-maven-plugin doesn't follow maven conventions. It stages all the projects with the last submodule: https://help.sonatype.com/repomanager2/staging-releases/configuring-your-project-for-deployment | |
| # This means there's no way to skip publishing of a particular module in a multi-module build, so we iterate over each module and publish them individually, | |
| # letting exists-maven-plugin skip the nexus-staging-maven-plugin's entire deploy goal if the artifact exists. | |
| run: | | |
| mvn --non-recursive --batch-mode --settings release/m2-settings.xml -DskipTests -Dcheckstyle.skip clean deploy | |
| modules=($(cat pom.xml | grep "<module>" | sed 's/\s*<.*>\(.*\)<.*>/\1/')) | |
| for module in "${modules[@]}" | |
| do | |
| mvn --batch-mode --projects $module --settings release/m2-settings.xml -DskipTests -Dcheckstyle.skip clean deploy | |
| done | |
| env: | |
| CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }} | |
| CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }} |