- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 79.2k
Migrate MyGet script to GH actions #41583
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really cool @supergibbs 🥳
Just one comment which is more a question :)
| jobs: | ||
| package-nuget: | ||
| runs-on: windows-latest | ||
| if: ${{ github.repository == 'twbs/bootstrap' && startsWith(github.event.release.tag_name, 'v') }} | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not exactly sure how NuGet versioning works, so I wanted to mention this. If we create a v6.0.0-alpha1 version, it will trigger the workflow and produce v6.0.0-alpha1 NuGet packages.
Do you know if NuGet treats that as the latest version?
If it does, maybe startsWith isn't enough: we might need to check that the version matches exactly vX.Y.Z without extra characters 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically it does, in the sense when browsing nuget.org it will let you know there is newer version 6.0.0-alpha1 if viewing 5.3.7. Example, here is the latest stable EntityFrameworkCore and there is a message about a newer one that is prerelease (10.0.0-preview.5.25277.114).
When installing though, the default is the latest (by SemVer) that is not a prerelease version. You can get the latest, including prerelease by adding -prerelease or a specific -version 5.3.7.
I noticed NuGet is the only one that doesn't specify a version on the Package Managers section. Should it?
Regarding better version tag validation, I am all for it but don't want to exclude prereleases since we've supported them in the past.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When installing though, the default is the latest (by SemVer) that is not a prerelease version.
NuGet is smarter than npm then 😄 From what I remember, in npm, you have to be explicit if you don’t want a version to be tagged as latest, even if it’s a pre-release like 2.0.0-beta.1. npm doesn’t care about the version name; it uses the latest tag by default unless you override it.
I noticed NuGet is the only one that doesn't specify a version on the Package Managers section. Should it?
When running npm install bootstrap, you get the latest (so currently the 5.3.7) and still we're specifying the version in the docs by saying npm install [email protected]. We could do the same for NuGet, yes :)
      
        
              This comment was marked as off-topic.
        
        
      
    
  This comment was marked as off-topic.
    
      
        1 similar comment
      
    
  
    
      
        
              This comment was marked as off-topic.
        
        
      
    
  This comment was marked as off-topic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking forward to this!
| That wasn't the case when the PR was initially created. I've just updated the action versions to use SHA-1 references, in line with the other jobs, via a3a7941: 
 Looks like we're ready to merge, then :) @mdo, I let you merge whenever you're available so that you can create the  | 
| Just added the secret here on the repo, so should be good to go. Going to rebase and then merge, and I'll try to release v5.3.8 in the coming days. | 
Bootstrap NuGet package when a release is created
… with 2 updates [skip ci] Bumps the security-critical group in /studio with 2 updates: [bootstrap](https://github.com/twbs/bootstrap) and [sweetalert2](https://github.com/sweetalert2/sweetalert2). Updates `bootstrap` from 5.3.7 to 5.3.8 Release notes *Sourced from [bootstrap's releases](https://github.com/twbs/bootstrap/releases).* > v5.3.8 > ------ > > What's Changed > -------------- > > * Streamline release prep script by [`@mdo`](https://github.com/mdo) in [twbs/bootstrap#41539](https://redirect.github.com/twbs/bootstrap/pull/41539) > * Docs: restore local dev port to 9001 by [`@chalin`](https://github.com/chalin) in [twbs/bootstrap#41545](https://redirect.github.com/twbs/bootstrap/pull/41545) > * Docs: use Example shortcode instead of divs with only `.bd-example` class by [`@julien-deramond`](https://github.com/julien-deramond) in [twbs/bootstrap#41556](https://redirect.github.com/twbs/bootstrap/pull/41556) > * Docs: fix scss autorecompile in dev mode by [`@MaxLardenois`](https://github.com/MaxLardenois) in [twbs/bootstrap#41574](https://redirect.github.com/twbs/bootstrap/pull/41574) > * Fix `color-contrast()` function for WCAG 2.1 compliance by [`@julien-deramond`](https://github.com/julien-deramond) in [twbs/bootstrap#41585](https://redirect.github.com/twbs/bootstrap/pull/41585) > * OSSF Scorecard by [`@mdo`](https://github.com/mdo) in [twbs/bootstrap#41571](https://redirect.github.com/twbs/bootstrap/pull/41571) > * Workflows: Use SHA-1 for third-party actions by [`@julien-deramond`](https://github.com/julien-deramond) in [twbs/bootstrap#41595](https://redirect.github.com/twbs/bootstrap/pull/41595) > * Docs: unminify downloadable example HTML files by [`@julien-deramond`](https://github.com/julien-deramond) in [twbs/bootstrap#41637](https://redirect.github.com/twbs/bootstrap/pull/41637) > * Docs: Add tooltips to buttons when `<Example>` is used, not just `<Code>` by [`@louismaximepiton`](https://github.com/louismaximepiton) in [twbs/bootstrap#41582](https://redirect.github.com/twbs/bootstrap/pull/41582) > * Set cursor pointer on input search cancel button by [`@mdo`](https://github.com/mdo) in [twbs/bootstrap#41639](https://redirect.github.com/twbs/bootstrap/pull/41639) > * CSS: Prevent spinner distortion in flex containers with multiline content by [`@julien-deramond`](https://github.com/julien-deramond) in [twbs/bootstrap#41654](https://redirect.github.com/twbs/bootstrap/pull/41654) > * Migrate MyGet script to GH actions by [`@supergibbs`](https://github.com/supergibbs) in [twbs/bootstrap#41583](https://redirect.github.com/twbs/bootstrap/pull/41583) > * Revert "Attempt to return focus explicitly to dropdown trigger" by [`@mdo`](https://github.com/mdo) in [twbs/bootstrap#41668](https://redirect.github.com/twbs/bootstrap/pull/41668) > * docs: Minor range example code optimization by [`@coliff`](https://github.com/coliff) in [twbs/bootstrap#41665](https://redirect.github.com/twbs/bootstrap/pull/41665) > * Remove Themes from docs by [`@mdo`](https://github.com/mdo) in [twbs/bootstrap#41671](https://redirect.github.com/twbs/bootstrap/pull/41671) > * Release v5.3.8 by [`@mdo`](https://github.com/mdo) in [twbs/bootstrap#41669](https://redirect.github.com/twbs/bootstrap/pull/41669) > > Dependencies > ------------ > > * Build(deps-dev): Bump the development-dependencies group with 3 updates by [`@julien-deramond`](https://github.com/julien-deramond) in [twbs/bootstrap#41540](https://redirect.github.com/twbs/bootstrap/pull/41540) > * Build(deps-dev): Bump the development-dependencies group with 2 updates by [`@julien-deramond`](https://github.com/julien-deramond) in [twbs/bootstrap#41544](https://redirect.github.com/twbs/bootstrap/pull/41544) > * Build(deps-dev): Bump stylelint-config-twbs-bootstrap from 16.0.0 to 16.1.0 by [`@julien-deramond`](https://github.com/julien-deramond) in [twbs/bootstrap#41546](https://redirect.github.com/twbs/bootstrap/pull/41546) > * Build(deps-dev): Bump the development-dependencies group with 5 updates by [`@julien-deramond`](https://github.com/julien-deramond) in [twbs/bootstrap#41552](https://redirect.github.com/twbs/bootstrap/pull/41552) > * Build(deps-dev): Bump the development-dependencies group with 4 updates by [`@julien-deramond`](https://github.com/julien-deramond) in [twbs/bootstrap#41560](https://redirect.github.com/twbs/bootstrap/pull/41560) > * Build(deps-dev): Bump the development-dependencies group with 3 updates by [`@julien-deramond`](https://github.com/julien-deramond) in [twbs/bootstrap#41566](https://redirect.github.com/twbs/bootstrap/pull/41566) > * Build(deps): Bump actions/upload-artifact from 4.6.1 to 4.6.2 by [`@dependabot`](https://github.com/dependabot)[bot] in [twbs/bootstrap#41594](https://redirect.github.com/twbs/bootstrap/pull/41594) > * Build(deps-dev): Bump the development-dependencies group with 4 updates by [`@julien-deramond`](https://github.com/julien-deramond) in [twbs/bootstrap#41599](https://redirect.github.com/twbs/bootstrap/pull/41599) > * Build(deps-dev): Bump the development-dependencies group with 2 updates by [`@julien-deramond`](https://github.com/julien-deramond) in [twbs/bootstrap#41609](https://redirect.github.com/twbs/bootstrap/pull/41609) > * Build(deps): Bump github/codeql-action from 3.29.2 to 3.29.3 by [`@dependabot`](https://github.com/dependabot)[bot] in [twbs/bootstrap#41611](https://redirect.github.com/twbs/bootstrap/pull/41611) > * Build(deps): Bump streetsidesoftware/cspell-action from 7.1.1 to 7.1.2 by [`@dependabot`](https://github.com/dependabot)[bot] in [twbs/bootstrap#41610](https://redirect.github.com/twbs/bootstrap/pull/41610) > * Build(deps-dev): Bump the development-dependencies group with 4 updates by [`@julien-deramond`](https://github.com/julien-deramond) in [twbs/bootstrap#41621](https://redirect.github.com/twbs/bootstrap/pull/41621) > * Build(deps): Bump streetsidesoftware/cspell-action from 7.1.2 to 7.2.0 by [`@dependabot`](https://github.com/dependabot)[bot] in [twbs/bootstrap#41625](https://redirect.github.com/twbs/bootstrap/pull/41625) > * Build(deps): Bump actions-cool/issues-helper from 3.6.0 to 3.6.2 by [`@dependabot`](https://github.com/dependabot)[bot] in [twbs/bootstrap#41623](https://redirect.github.com/twbs/bootstrap/pull/41623) > * Build(deps): Bump github/codeql-action from 3.29.3 to 3.29.4 by [`@dependabot`](https://github.com/dependabot)[bot] in [twbs/bootstrap#41624](https://redirect.github.com/twbs/bootstrap/pull/41624) > * Build(deps-dev): Bump the development-dependencies group across 1 directory with 3 updates by [`@dependabot`](https://github.com/dependabot)[bot] in [twbs/bootstrap#41626](https://redirect.github.com/twbs/bootstrap/pull/41626) > * Build(deps): Bump github/codeql-action from 3.29.4 to 3.29.5 by [`@dependabot`](https://github.com/dependabot)[bot] in [twbs/bootstrap#41640](https://redirect.github.com/twbs/bootstrap/pull/41640) > * Build(deps): Bump tmp from 0.2.3 to 0.2.4 by [`@dependabot`](https://github.com/dependabot)[bot] in [twbs/bootstrap#41649](https://redirect.github.com/twbs/bootstrap/pull/41649) > * Build(deps): Bump github/codeql-action from 3.29.7 to 3.29.8 by [`@dependabot`](https://github.com/dependabot)[bot] in [twbs/bootstrap#41657](https://redirect.github.com/twbs/bootstrap/pull/41657) > * Build(deps): Bump actions/checkout from 4.2.2 to 5.0.0 by [`@dependabot`](https://github.com/dependabot)[bot] in [twbs/bootstrap#41655](https://redirect.github.com/twbs/bootstrap/pull/41655) > * Build(deps): Bump github/codeql-action from 3.29.8 to 3.29.10 by [`@dependabot`](https://github.com/dependabot)[bot] in [twbs/bootstrap#41664](https://redirect.github.com/twbs/bootstrap/pull/41664) > > New Contributors > ---------------- > > * [`@chalin`](https://github.com/chalin) made their first contribution in [twbs/bootstrap#41545](https://redirect.github.com/twbs/bootstrap/pull/41545) > > **Full Changelog**: <twbs/bootstrap@v5.3.7...v5.3.8> Commits * [`25aa8cc`](twbs/bootstrap@25aa8cc) Release v5.3.8 ([#41669](https://redirect.github.com/twbs/bootstrap/issues/41669)) * [`122bff5`](twbs/bootstrap@122bff5) Remove Themes from docs ([#41671](https://redirect.github.com/twbs/bootstrap/issues/41671)) * [`320f713`](twbs/bootstrap@320f713) docs: Minor range example code optimization ([#41665](https://redirect.github.com/twbs/bootstrap/issues/41665)) * [`ac5f51c`](twbs/bootstrap@ac5f51c) Revert "Attempt to return focus explicitly to dropdown trigger ([#41365](https://redirect.github.com/twbs/bootstrap/issues/41365))" ([#41](https://redirect.github.com/twbs/bootstrap/issues/41)... * [`4bd8b6c`](twbs/bootstrap@4bd8b6c) Migrate MyGet script to GH actions ([#41583](https://redirect.github.com/twbs/bootstrap/issues/41583)) * [`f50f38b`](twbs/bootstrap@f50f38b) CSS: Fix spinner deformation in flex boxes when content is multiline ([#41654](https://redirect.github.com/twbs/bootstrap/issues/41654)) * [`47c75b8`](twbs/bootstrap@47c75b8) Set cursor pointer on input search cancel button ([#41639](https://redirect.github.com/twbs/bootstrap/issues/41639)) * [`26c86ba`](twbs/bootstrap@26c86ba) Build(deps): Bump github/codeql-action from 3.29.8 to 3.29.10 ([#41664](https://redirect.github.com/twbs/bootstrap/issues/41664)) * [`099b02b`](twbs/bootstrap@099b02b) Build(deps-dev): Bump rollup from 4.46.2 to 4.46.3 * [`4b8a2c9`](twbs/bootstrap@4b8a2c9) Build(deps-dev): bump dependencies * Additional commits viewable in [compare view](twbs/bootstrap@v5.3.7...v5.3.8) Updates `sweetalert2` from 11.22.4 to 11.23.0 Release notes *Sourced from [sweetalert2's releases](https://github.com/sweetalert2/sweetalert2/releases).* > v11.23.0 > -------- > > [11.23.0](sweetalert2/sweetalert2@v11.22.4...v11.23.0) (2025-09-04) > ============================================================================================== > > ### Features > > * replace deprecated word-wrap with overflow-wrap ([2667a49](sweetalert2/sweetalert2@2667a49)) > > v11.22.5 > -------- > > No release notes provided. Changelog *Sourced from [sweetalert2's changelog](https://github.com/sweetalert2/sweetalert2/blob/main/CHANGELOG.md).* > [11.23.0](sweetalert2/sweetalert2@v11.22.4...v11.23.0) (2025-09-04) > ============================================================================================== > > ### Features > > * replace deprecated word-wrap with overflow-wrap ([2667a49](sweetalert2/sweetalert2@2667a49)) Commits * [`fc465a4`](sweetalert2/sweetalert2@fc465a4) chore(release): 11.23.0 [skip ci] * [`2667a49`](sweetalert2/sweetalert2@2667a49) feat: replace deprecated word-wrap with overflow-wrap * [`cf4b189`](sweetalert2/sweetalert2@cf4b189) chore: bump yarn.lock * [`b27bacf`](sweetalert2/sweetalert2@b27bacf) chore: add venuslovedolls to sponsors * [`9dc7802`](sweetalert2/sweetalert2@9dc7802) chore(deps): update dependency cypress to v15 ([#2857](https://redirect.github.com/sweetalert2/sweetalert2/issues/2857)) * [`f824237`](sweetalert2/sweetalert2@f824237) chore: remove code comment that got missed in PR [#2847](https://redirect.github.com/sweetalert2/sweetalert2/issues/2847) ([#2854](https://redirect.github.com/sweetalert2/sweetalert2/issues/2854)) * [`2af063c`](sweetalert2/sweetalert2@2af063c) chore(deps): update dependency eslint-plugin-jsdoc to v54 ([#2851](https://redirect.github.com/sweetalert2/sweetalert2/issues/2851)) * [`80d573e`](sweetalert2/sweetalert2@80d573e) chore(deps): update dependency eslint-plugin-jsdoc to v53 ([#2850](https://redirect.github.com/sweetalert2/sweetalert2/issues/2850)) * [`4a490d5`](sweetalert2/sweetalert2@4a490d5) chore(deps): update actions/checkout action to v5 ([#2849](https://redirect.github.com/sweetalert2/sweetalert2/issues/2849)) * [`47b4da4`](sweetalert2/sweetalert2@47b4da4) Update SPONSORS.md * See full diff in [compare view](sweetalert2/sweetalert2@v11.22.4...v11.23.0) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- Dependabot commands and options You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Description
Migrate MyGet script to GitHub Actions to automatically build/publish the Bootstrap NuGet package when a release is created
Needs NuGetAPIKey to be added to repo secrets (I can provide or @mdo can create API key)
Rules for action to run:
v(this matches all current releases)Risks
Due to how NuGet works, if a version is accidentally published, there is no way to update it. If there is an issue, it can be delisted but a version change is required. In those cases, it would need to be manually fixed and add a build to it.
Example:
Release
v5.3.8is accidentally created on GitHub and deploys to NuGet. Release is deleted and recreated asv5.3.8but the NuGet action failsTo fix, the
5.3.8NuGet package should be delisted and manually republished as5.3.8+aor some other+buildto change the version.I am guessing this is true with other package systems so if others are automated, better to just release
5.3.9and mark5.3.8as deprecated.Motivation & Context
Streamline publishing of NuGet package
Type of changes
Just CI/CD changes in GitHub Actions, no change to Bootstrap itself
Checklist
npm run lint)Live previews
My testing on my fork
https://github.com/supergibbs/bootstrap/actions
Related issues
Was discussed with @mdo on #41358