Skip to content

Commit

Permalink
Adding a release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
krmahadevan committed Jun 21, 2022
1 parent c394d37 commit 2312fca
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/publish-maven-central.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ jobs:
- 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"
echo "Now run 'release-maven-central.yml' workflow using the same Release Candidate Number (rc #)"
40 changes: 40 additions & 0 deletions .github/workflows/release-maven-central.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# 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'
# 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@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 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

0 comments on commit 2312fca

Please sign in to comment.