Files icon indicating copy to clipboard operation
Files copied to clipboard

Controls: Added metadata to the Controls project to enable publishing to NuGet

Open Lamparter opened this issue 1 year ago • 9 comments

Resolved / Related Issues

Discussed on Discord

Steps used to test these changes

  1. Built the Files controls project
  2. Checked for Roslyn analysers during build
  3. Ensured NuGet package was correctly generated
  4. 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 main and 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

Lamparter avatar Dec 16 '24 18:12 Lamparter

Note for reviewer: image The CD fails because there is no such API key provided (please create a NUGET_API_KEY secret in the repository to enable publishing)

Lamparter avatar Dec 24 '24 19:12 Lamparter

We should do this after v4 or even later. What do you think?

0x5bfa avatar Jan 14 '25 15:01 0x5bfa

We can move forward with this as soon as the versioning system is agreed on.

yaira2 avatar Jan 14 '25 16:01 yaira2

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.

0x5bfa avatar Jan 15 '25 01:01 0x5bfa

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 avatar Jan 15 '25 01:01 yaira2

@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

Lamparter avatar Feb 09 '25 16:02 Lamparter

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

Lamparter avatar Feb 09 '25 16:02 Lamparter

@yaira2 this PR is ready to review.

Lamparter avatar Mar 02 '25 14:03 Lamparter

Oh, sorry, I forgot to exclude the WCT 7.x controls

Lamparter avatar Mar 29 '25 13:03 Lamparter

@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.

yaira2 avatar Sep 28 '25 19:09 yaira2