From 75b3c14adb5e71b87227f89bc3c927a732298573 Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Wed, 24 Jul 2024 17:56:24 +0200 Subject: [PATCH] pre/post release steps --- .github/workflows/release.yml | 48 +++++++++++++++++++++++++++++----- pom.xml | 2 +- pom.xml.gpg | Bin 4799 -> 0 bytes 3 files changed, 42 insertions(+), 8 deletions(-) delete mode 100644 pom.xml.gpg diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f8d87d674..a2b0c1610 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,8 +17,8 @@ jobs: java-version: '22' cache: maven server-id: central - server-username: NEXUS_USER - server-password: NEXUS_PASSWORD + server-username: MAVEN_USER + server-password: MAVEN_PASSWORD gpg-private-key: ${{ secrets.GPG_SIGNING_KEY_GITHUB_TECHUSER }} gpg-passphrase: MAVEN_GPG_PASSPHRASE @@ -40,24 +40,58 @@ jobs: - name: Diag run: | echo "=====================" - echo " Maven" + echo " Maven " echo "=====================" mvn -v echo "=====================" - echo " Global settings" + echo " Global settings " echo "=====================" cat $HOME/.m2/settings.xml echo "" echo "=====================" - echo " Git config" + echo " Git config " echo "=====================" git config -l --global + - name: Release preparation + id: pre-release + shell: bash + run: | + gh extension install valeriobelli/gh-milestone + version=$(mvn -q -DforceStdout help:evaluate -N -Dexpression=project.version | sed -rn 's/([^-]+)(-SNAPSHOT|)$/\1/p') + echo "VERSION=$version" >> "$GITHUB_OUTPUT" + - name: Release env: MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} MAVEN_GPG_KEY_FINGERPRINT: '0x0181A4828FA27B6BE6F1F5A68611CD28F472E006!' - NEXUS_USER: ${{ secrets.NEXUS_USER }} - NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} + MAVEN_USER: ${{ secrets.NEXUS_USER }} + MAVEN_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} run: | mvn -B release:prepare release:perform -Darguments="-DskipTests" + + - name: Post release + run: | + version=${{ steps.pre-release.outputs.VERSION }} + echo "Trying to find milestone $version" + milestone=$(gh milestone list --json id,title,state --jq "map_values(select(.title == \"${version}\" and .state == \"OPEN\")).[].number") + if [ -z "$milestone" ]; then + echo "Found milestone $version, closing it" + gh milestone edit $milestone --state closed + fi + + version=$(mvn -q -DforceStdout help:evaluate -N -Dexpression=project.version | sed -rn 's/([^-]+)(-SNAPSHOT|)$/\1/p') + echo "Preparing development $version" + echo "Trying to find milestone $version" + milestone=$(gh milestone list --json id,title,state --jq "map_values(select(.title == \"${version}\" and .state == \"OPEN\")).[].number") + if [ ! -z "$milestone" ]; then + echo "Creating milestone $version" + gh milestone create --title $milestone + fi + + name=$(mvn -q -DforceStdout help:evaluate -N -Dexpression=project.name) + version=${{ steps.pre-release.outputs.VERSION }} + tag=$(git describe --tags --abbrev=0) + echo "Creating release \"$name $version\" from tag $tag" + gh release create $tag --verify-tag --notes-from-tag --title "$name $version" + diff --git a/pom.xml b/pom.xml index 7d0c0d3ee..a985c79d8 100644 --- a/pom.xml +++ b/pom.xml @@ -17,7 +17,7 @@ jline-parent 3.29.6-SNAPSHOT pom - JLine Parent + JLine JLine https://github.com/jline/jline3 diff --git a/pom.xml.gpg b/pom.xml.gpg deleted file mode 100644 index 16380f13d0f52410c8f1623467adafac2f3efdb3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4799 zcmV;w55$)j)Ra82M!<&g3AhC zL}XS)R%K;orMvC!7JX<{zIgA&doNzRU;NS6e)7s!-~7(kKfnGZ`{FCF{nhh-@Beg4 zW9K-I2H*X`R_|Nz!x~}62~F-?TXB}JSvc`&K$7szwI>Jn?c3MB;j`dN$+*QF_Np&9eBLs{tNT)7Kd*lYGygffn=UbSto1u#9t zzOcY@3BPkqasUP~8sWr2De{M!#iPAlcimZ*7FC!V$DE9@pFMl#JX=$EV8a#ngDc<;^_4y?HnZkoD1bd$|77`-W#^a&*F0^2UQ7cVeWX3WQ#^WZ z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