chore(main): release dev.openfeature.contrib.providers.flagd 0.10.2 (… #1002
This file contains 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 | |
# Release-please creates a PR that tracks all changes | |
steps: | |
- uses: google-github-actions/release-please-action@e4dc86ba9405554aeba3c6bb2d169500e7d3b4ee # v4 | |
id: release | |
with: | |
token: ${{secrets.GITHUB_TOKEN}} | |
# The logic below handles the maven publication: | |
- name: Checkout Repository | |
if: ${{ steps.release.outputs.releases_created }} | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Set up JDK 8 | |
if: ${{ steps.release.outputs.releases_created }} | |
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4 | |
with: | |
java-version: '8' | |
distribution: 'temurin' | |
cache: maven | |
server-id: ossrh | |
server-username: OSSRH_USERNAME | |
server-password: OSSRH_PASSWORD | |
- name: Cache local Maven repository | |
if: ${{ steps.release.outputs.releases_created }} | |
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Configure GPG Key | |
if: ${{ steps.release.outputs.releases_created }} | |
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 | |
if: ${{ steps.release.outputs.releases_created }} | |
# 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: | |
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} |