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

AUTHLIB-153: Adding workflow to publish SNAPSHOT jars #3

Merged
merged 3 commits into from
Dec 6, 2024

Conversation

vijetmuley3
Copy link
Contributor

Overview

Added workflow to publish SNAPSHOT jars

Issues

AUTHLIB-153

Discussion

  • Added to the .github/workflows/build.yaml workflow to check if the version in project's pom.xml has the keyword SNAPSHOT
  • If present, the workflow will publish it after the build step

@@ -29,4 +29,18 @@ jobs:

- name: Build with Maven
run: mvn package

# Extract version from pom.xml
- name: Get Version from POM
Copy link
Member

Choose a reason for hiding this comment

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

The comments don't really add anything that isn't explained by the step name. I'd probably remove them.


#Publish jar if `SNAPSHOT` is present in the version
- name: Publish SNAPSHOT JAR
if: contains(env.version, '-SNAPSHOT')
Copy link
Member

Choose a reason for hiding this comment

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

The other condition is that we only want to do this when code is merged to the main branch.

Copy link
Member

Choose a reason for hiding this comment

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

It also looks like you need to add packages: write permission to the job.

Copy link
Member

@heathharrelson heathharrelson left a comment

Choose a reason for hiding this comment

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

This was easier than I expected. Feel free to merge once you've addressed my comments.

@vijetmuley3
Copy link
Contributor Author

Made the suggested changes. It did behave the way it is expected to. It did not publish the JAR it generated. Once I merge it now, it should publish that JAR, I believe. Merging this PR now

@vijetmuley3 vijetmuley3 merged commit 5b44244 into main Dec 6, 2024
1 check passed
@vijetmuley3 vijetmuley3 deleted the AUTHLIB-153 branch December 6, 2024 00:22
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