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

Add workflow to automate updating references to Carter NuGet package #304

Merged
merged 14 commits into from
Nov 19, 2022

Conversation

mderriey
Copy link
Collaborator

@mderriey mderriey commented Nov 4, 2022

Sort of related to #298, and discussed in #299 (comment)

This pull request adds a new manual workflow that crawls through the .csproj files in the repo and updates references to the Carter NuGet package.
The workflow uses the NuGet API to find the latest published version of the package; there's the option of including prerelease versions in the search process.

Lots of junk in the workflow file

Manual workflows can only be run if their workflow file are in the default branch, which is not the case here.
As a result, I added a push trigger to test out the process.
I've highlighted the portions that will be removed before this gets merged if deemed aceptable.

Edit: that's now been removed in 3448d33

What about the other repositories?

You mentioned that you were interested in having such a process for several repos under the Carter organisation.
This PR deliberately focuses on a single repository, and I've thought about how to use it in several repositories.
If you're happy with this and it gets merged, I'll open a new issue with my thoughts and we can take it further.

Test runs

Here's a run where we include prerelease versions, and commit and push.

We can see it worked nicely, and resulted in b3e0e7b, which looks like it was authored by Jonathan; it was of course reverted in 516dd02.

Changes required before this can get merged

  • Remove the "push" trigger
  • Remove the step run during a "push" trigger
  • Remove the "check if workflow_dispatch" conditions since it'll become the only trigger
  • Uncomment the part where we commit and push

@jchannon
Copy link
Member

jchannon commented Nov 5, 2022

Might be worth a chat on the Carter Slack channel about these 3 PRs to discuss what we should do going forward?

@jchannon
Copy link
Member

Do we need to merge #303 and then #304?

@mderriey
Copy link
Collaborator Author

Might be worth a chat on the Carter Slack channel about these 3 PRs to discuss what we should do going forward?

Apologies, I missed this 🤦‍♂️
I'll join quickly and we can chat about it.

Do we need to merge #303 and then #304?

I don't think this is dependent on the other one.

@jchannon jchannon force-pushed the mderriey/update-carter-package-references branch from 80e4791 to e5af5e5 Compare November 19, 2022 14:54
@jchannon jchannon merged commit 735deda into defaultinterface Nov 19, 2022
@mderriey mderriey deleted the mderriey/update-carter-package-references branch November 20, 2022 13:23
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.

None yet

2 participants