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

Automatic release workflow completed #7

Merged
merged 4 commits into from
Sep 20, 2023
Merged

Conversation

marcelmmc
Copy link
Collaborator

@marcelmmc marcelmmc commented Sep 17, 2023

Hi @johentsch, after taking in consideration the feedback. I think this version could be merged to the main branch. Nevertheless, There are couple of things that needs to be mentioned for this PR:

  • Rather than using the https://github.com/marketplace/actions/automatic-releases, I swapped the action with https://github.com/marketplace/actions/create-release, the main reason for this decision is that automatic releases requires some changes to its source, there has not been much support for two years, and the mechanism to create the action in the marketplace is a bit ambiguous.

  • For the zenodo and citation files, there are two ways in which we could replace the tags, which one would you prefer?

    • The old tag is used to replace strings in the files
    • Using a regex with pattern v\d+\.(\d+\.\d+|\d+) to replace strings in the files

    Notice: the advantage of using regex is that for any string version which is not the latest tag, these will still update with the new tag

  • It does not seem possible to update the zenodo and citation files when the PR is being merged, a simple solution is to push these changes to the main branch once the PR is merged, what do you think about this?

  • When applying transform, should we commit and push the generated files ?

@johentsch
Copy link
Member

Thanks a lot!

* For the zenodo and citation files, there are two ways in which we could replace the tags, which one would you prefer?
  
  * The old tag is used to replace strings in the files
  * Using a regex with pattern `v\d+\.(\d+\.\d+|\d+)` to replace strings in the files

Please do the former, via exact string matching. Otherwise we cannot mention older versions in the README, for example.

* It does not seem possible to update the zenodo and citation files when the PR is being merged, a simple solution is to push these changes to the main branch once the PR is merged, what do you think about this?

OK if I understand correctly the order of events as follows:

  • merge
  • update files & push
  • create tag & release
* When applying transform, should we commit and push the generated files ?

No.

@marcelmmc
Copy link
Collaborator Author

Thanks @johentsch, the modifications for the workflow have been pushed.

@marcelmmc marcelmmc self-assigned this Sep 17, 2023
@johentsch
Copy link
Member

Amazing, trying it out now, thank you!

Do we currently have a mechanism for going to the next major version? Like, in the marketplace action we have seen, they use particular labels such as major as a signal, but any other solution, e.g. involving manual tag assignment, would be good, too.

@johentsch
Copy link
Member

So we tested the latest version of the version_release here and there was a glitch.

The two latest tags had been v2.0 and v2.1 but the action created a release pointing to v2.0 instead of correctly creating the new tag v2.2 (I've corrected that manually). Could you please check? The reason is obviously that this was the first release on this repo, but the action should be finding the latest tag even if no release is attached to it. Is it maybe because of the change that I had done to the code, putting in v2.0 as the default value?

@marcelmmc
Copy link
Collaborator Author

The workflow was getting the latest tag release, now it should retrieve the latest tag. In addition, a label named major_version can be attached to the PR to update the major version part of the tag. Note that when updating the major version, minor version returns to zero. For instance, 2.20 -> 3.0

Copy link
Member

@johentsch johentsch left a comment

Choose a reason for hiding this comment

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

Nice, @marcelmmc, let's try it out then.

@johentsch johentsch merged commit 7e49c25 into main Sep 20, 2023
@johentsch johentsch deleted the automatic_workflow_release branch September 20, 2023 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants