diff --git a/.github/workflows/publish-maven-central.yml b/.github/workflows/publish-maven-central.yml index 94483549bf..d434216573 100644 --- a/.github/workflows/publish-maven-central.yml +++ b/.github/workflows/publish-maven-central.yml @@ -5,10 +5,12 @@ name: Publish to Maven Central # Trigger this workflow whenever code is pushed to "master" branch.defaults: # We would like to publish to maven central for both snapshot and release versions. on: - push: - branches: [ master ] - - + workflow_dispatch: + inputs: + release_candidate: + description: The release candidate number + required: true + default: '1' # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains a single job called "build" @@ -18,25 +20,25 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - - name: Gradle wrapper validation - uses: gradle/wrapper-validation-action@v1 - - # Runs a single command using the runners shell - - name: Install gpg secret key - run: | - cat <(echo -e "${{ secrets.GPG_SECRET_KEY }}") | gpg --batch --import - gpg --export-secret-keys >$HOME/.gnupg/secring.gpg - gpg --list-secret-keys --keyid-format LONG - ls -l $HOME/.gnupg - - # FIXME Check https://github.com/allure-framework/allure2/blob/430255d8cf5c236ed29bc0df0b72dcd9389c3df9/.github/workflows/release.yaml - #- name: Publish release - # run: | - # ./gradlew -PghNexusUsername=${{ secrets.SONATYPE_USER }} -PghNexusPassword=${{ secrets.SONATYPE_PASSWORD }} -Psigning.secretKeyRingFile=$HOME/.gnupg/secring.gpg -Psigning.password="" -Psigning.keyId=${{ secrets.GPG_KEY_ID }} -Prc=1 prepareVote - - #- name: Display next step - # run: | - # echo "Now go to https://oss.sonatype.org/index.html#stagingRepositories, select the repo, Close it and then Release it" + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v3.5.0 + + - name: Gradle wrapper validation + uses: gradle/wrapper-validation-action@v1.0.6 + + # Runs a single command using the runners shell + - name: Install gpg secret key + run: | + cat <(echo -e "${{ secrets.GPG_SECRET_KEY }}") | gpg --batch --import + gpg --export-secret-keys >$HOME/.gnupg/secring.gpg + gpg --list-secret-keys --keyid-format LONG + ls -l $HOME/.gnupg + + # FIXME Check https://github.com/allure-framework/allure2/blob/430255d8cf5c236ed29bc0df0b72dcd9389c3df9/.github/workflows/release.yaml + - name: Publish Release Candidate + run: | + ./gradlew -PghGitSourceUsername=cbeust -PghGitSourcePassword=${{ secrets.GITHUB_TOKEN }} -PghDryRun -PghNexusUsername=${{ secrets.SONATYPE_USER }} -PghNexusPassword=${{ secrets.SONATYPE_PASSWORD }} -Psigning.secretKeyRingFile=$HOME/.gnupg/secring.gpg -Psigning.password="" -Psigning.keyId=${{ secrets.GPG_KEY_ID }} -Prc=${{ github.event.inputs.release_candidate }} prepareVote + + - name: Display next step + run: | + echo "Now run 'release-maven-central.yml' workflow using the same Release Candidate Number (rc #)" diff --git a/.github/workflows/release-maven-central.yml b/.github/workflows/release-maven-central.yml new file mode 100644 index 0000000000..01eefc2e80 --- /dev/null +++ b/.github/workflows/release-maven-central.yml @@ -0,0 +1,50 @@ +# This is a basic workflow to help you get started with Actions + +name: Release TestNG to Maven Central + +# Trigger this workflow whenever code is pushed to "master" branch.defaults: +# We would like to publish to maven central for both snapshot and release versions. +on: + workflow_dispatch: + inputs: + release_candidate: + description: The release candidate number that was already published + required: true + default: '1' + staging_repository_id: + description: The staging repository ID obtained from workflow run logs of "publish-maven-central.yml" for e.g., (orgtestng-1082) + required: true +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v3.5.0 + with: + fetch-depth: 0 + + - name: Gradle wrapper validation + uses: gradle/wrapper-validation-action@v1.0.6 + + # Runs a single command using the runners shell + - name: Install gpg secret key + run: | + cat <(echo -e "${{ secrets.GPG_SECRET_KEY }}") | gpg --batch --import + gpg --export-secret-keys >$HOME/.gnupg/secring.gpg + gpg --list-secret-keys --keyid-format LONG + ls -l $HOME/.gnupg + + - name: Create Nexus.txt with staging repository details + run: | + mkdir -p build/stagingRepositories + echo -n ${{ github.event.inputs.staging_repository_id }} > build/stagingRepositories/nexus.txt + + # FIXME Check https://github.com/allure-framework/allure2/blob/430255d8cf5c236ed29bc0df0b72dcd9389c3df9/.github/workflows/release.yaml + - name: Publish Release Candidate + run: | + ./gradlew -PghGitSourceUsername=cbeust -PghGitSourcePassword=${{ secrets.GITHUB_TOKEN }} -PghDryRun -PghNexusUsername=${{ secrets.SONATYPE_USER }} -PghNexusPassword=${{ secrets.SONATYPE_PASSWORD }} -Psigning.secretKeyRingFile=$HOME/.gnupg/secring.gpg -Psigning.password="" -Psigning.keyId=${{ secrets.GPG_KEY_ID }} -Prc=${{ github.event.inputs.release_candidate }} publishDist diff --git a/.gitignore b/.gitignore index 412e5342d2..95f89094f6 100644 --- a/.gitignore +++ b/.gitignore @@ -24,5 +24,6 @@ test-output-tests testng.iml z_build .DS_Store +**/bin/ **/Version.java diff --git a/gradle.properties b/gradle.properties index dba9f5f4a4..4bd597caa9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,7 +5,7 @@ kotlin.code.style=official # Note: testng.kotlin-library.gradle.kts adds kotlin-stdlib for testImplementation kotlin.stdlib.default.dependency=false -testng.version=7.5 +testng.version=7.5.1 group=org.testng diff --git a/versions.properties b/versions.properties index ba5f8e8459..e51ec4239b 100644 --- a/versions.properties +++ b/versions.properties @@ -11,7 +11,7 @@ plugin.com.github.johnrengelman.shadow=7.0.0 plugin.com.github.vlsi.gradle-extensions=1.74 -plugin.com.github.vlsi.stage-vote-release=1.74 +plugin.com.github.vlsi.stage-vote-release=1.78 version.ch.qos.logback..logback-classic=1.2.3