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

feat: releases #20

Merged
merged 2 commits into from
Feb 29, 2024
Merged

feat: releases #20

merged 2 commits into from
Feb 29, 2024

Conversation

mbystedt
Copy link
Collaborator

@mbystedt mbystedt commented Feb 6, 2024

The protection on the main will prevent this from working. Needs revision.

Some ideas:

  • Ignore pom version completely
    • Always update the version in the pom before building
    • CI could take version as an optional param (non-versioned ones given version like: main-snapshot)
  • Dev commits major (and minor?) version (no snapshot!)
    • Like above, but, check pom version and reject if tag doesn't start with pom version.
    • Example: pom.xml -> 1, tag: v1.2.4; Update pom.xml to 1.2.4 and build.
    • Example: pom.xml -> 1.0, tag: v1.2.4; Reject
    • Non tagged builds become the pom.xml version with -snapshot.

I'm warming to option 2. It's more complicated to implement, but, it has some good checks (can't accidentally release a whacky version). It could be coupled with a workflow (or locally run script) to increment the version after release.

@mbystedt mbystedt requested a review from andrwils February 6, 2024 18:22
@andrwils
Copy link
Contributor

andrwils commented Feb 12, 2024

@mbystedt I might change my mind, but for now I like option 1, and that's the approach I'm using for experimentation. I commit a snapshot version at first and that lets my cycle through some deployments and testing, then I push a tag, say v1.0.0 and the workflow updates the pom file to use that tag as the version, commits the change and pushes the tag to GitHub. However, when I trigger the workflow by pushing a tag, the checkout is in a detached state, so when the tag gets pushed, it's not associated with a branch and I don't see the updated version in my branch's pom file.

@andrwils
Copy link
Contributor

@mbystedt I've got the pom file update working and now I'm working on changing the deployment pipeline to deploy tags instead of branches. Once I have that worked out, I'll start looking at the tag validation in option 2.

@andrwils andrwils force-pushed the feat/buildOnTaggedRelease branch from d198450 to 465af8f Compare February 15, 2024 23:06
@andrwils andrwils force-pushed the feat/buildOnTaggedRelease branch from 465af8f to 5224de7 Compare February 16, 2024 01:10
@andrwils andrwils force-pushed the feat/buildOnTaggedRelease branch from 01ee435 to 5d5aa43 Compare February 29, 2024 20:03
@andrwils andrwils marked this pull request as ready for review February 29, 2024 20:05
@andrwils andrwils force-pushed the feat/buildOnTaggedRelease branch from 5d5aa43 to 23a55c4 Compare February 29, 2024 20:09
@andrwils andrwils force-pushed the feat/buildOnTaggedRelease branch from 23a55c4 to 2116615 Compare February 29, 2024 20:13
@mbystedt mbystedt changed the title feat: release on v* tag (depends on unprotected main) feat: releases Feb 29, 2024
@andrwils andrwils merged commit aa423b0 into main Feb 29, 2024
1 check passed
@andrwils andrwils deleted the feat/buildOnTaggedRelease branch February 29, 2024 22:01
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