Controls: Added metadata to the Controls project to enable publishing to NuGet
Resolved / Related Issues
Discussed on Discord
Steps used to test these changes
- Built the Files controls project
- Checked for Roslyn analysers during build
- Ensured NuGet package was correctly generated
- Inspected NuGet package internals to ensure proper generation and inclusion of XAML resources
WHEN PR IS ACCEPTED (NOT BEFORE)
- [x] Implement actual secret
- [x] Set environment to
NuGet - [x] Remove build on
mainand PR configurations - [x] Add condition for run to only happen on changes made to
CurrentVersion.props - [x] Replace default GitHub Actions runner token with
files-community-bot[bot]token
Note for reviewer:
The CD fails because there is no such API key provided (please create a
NUGET_API_KEY secret in the repository to enable publishing)
We should do this after v4 or even later. What do you think?
We can move forward with this as soon as the versioning system is agreed on.
If you'd like to publish when you publish preview or stable thru Files CD, we can add a parameter text box to input the version. If empty, don't publish; otherwise, try publish with that version string.
This shouldn't be tied to app releases. We may have a newer control ready for release before an app update, and on the other hand, we may want to release the app without updating the controls. It's best to handle this as a separate action.
@yaira2 when you approve you'll need to give the bot access to the repo
I think it's the read and write to pull request data permission
FYI this is an example of what it will look like https://github.com/Lamparter/Files/pull/13
The steps to activate it:
- Run the "Bump controls version" workflow
- This will open a PR on the repo
- When the PR is merged, it will publish to NuGet automatically (it will ask you to double check)
- Or, in any PR or commit to the repo, bump the version in
Files.App.Controls\CurrentVersion.props- When the commit is made into the main branch of the repo, it will publish to NuGet
@yaira2 this PR is ready to review.
Oh, sorry, I forgot to exclude the WCT 7.x controls
@Lamparter thank you for all your efforts with this PR. We're putting this on hold for now, but it wouldn't hurt to keep the branch in case we decide to continue with this in the future.