Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate deploy with GHA #946

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Automate deploy with GHA #946

wants to merge 1 commit into from

Conversation

clairemcginty
Copy link

  • standardizes on Sonatype for both stable releases + snapshots
  • automates release via a dispatch workflow (automatically triggering a release on a tag/release doesn't work well with maven release plugin; it will automatically bump project version, commit that to GitHub, then push a tag. See more here)

Tested with dry-run and snapshot builds locally. I set the -DdryRun=true flag in the workflow build for now, so that we can run a test on GHA. Then we can remove the flag

Copy link

codecov bot commented Dec 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.65%. Comparing base (5f56efb) to head (ec26133).

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #946   +/-   ##
=========================================
  Coverage     91.65%   91.65%           
  Complexity      252      252           
=========================================
  Files            26       26           
  Lines           947      947           
  Branches         71       71           
=========================================
  Hits            868      868           
  Misses           52       52           
  Partials         27       27           

Copy link
Contributor

@RustedBones RustedBones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a nice process.
I suppose we have to select the branch when running the workflow. It's more convenient to run on master/main but that will probably mean we can't enable the branch protection rule.

If we want this extra security, we should create a release/vX.Y.Z branch, run the action from this one and then create a pull-request and a merge commit in the main branch

MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
# Todo - remove dry-run flag once validated in GHA
run: |
export GPG_TTY=$(tty)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this required ?

release:
name: Release
runs-on: 'ubuntu-latest'
environment: main_env
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we have an environment ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants