Skip to content

chore(main): release dev.openfeature.contrib.tools.flagdhttpconnector… #1369

chore(main): release dev.openfeature.contrib.tools.flagdhttpconnector…

chore(main): release dev.openfeature.contrib.tools.flagdhttpconnector… #1369

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@a02a34c4d625f9be7cb89156071d8567266a2445 # 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up JDK 21
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4
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@5a3ec84eff668545956fd18022155c47e93e2684 # 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
# 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 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 clean deploy
done
env:
CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }}