Skip to content

Conversation

@JamieMagee
Copy link
Member

This PR simplifies and separates the build and release GitHub actions workflows.

  • The build workflow builds and runs tests on push to any branch, and pull requests
  • The release workflow builds and publishes self-contained binaries and NuGet packages when a release is published i.e. moved from draft to published

You can see what this looks like in my fork of this repository1. However, I was unable to get the NuGet publishing to work correctly. I believe this is due to the permissions set on GITHUB_TOKEN for forked repositories2

Other changes:

  • Replaced the deprecated actions/upload-release-asset action with the shogo82148/actions-upload-release-asset action (This appears to be the community replacement"
  • No longer publish platform-independent runtime-dependent releases in favour of platform-dependent runtime-independent
  • Simplify NuGet package publishing now that GitHub packages registry supports NuGet's --api-key flag3

Closes #21

Footnotes

  1. https://github.com/JamieMagee/component-detection/releases/tag/v1.0.14

  2. https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token

  3. https://github.com/NuGet/Home/issues/8580#issuecomment-714501802

@JamieMagee JamieMagee added the type:ci Build or repository configuration label Jan 4, 2022
@JamieMagee JamieMagee requested a review from a team as a code owner January 4, 2022 00:48
@JamieMagee JamieMagee requested a review from tevoinea January 4, 2022 00:48
@JamieMagee JamieMagee merged commit a607edc into microsoft:main Feb 2, 2022
@JamieMagee JamieMagee deleted the users/jamagee/release-workflow branch February 2, 2022 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:ci Build or repository configuration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Attach self-contained binaries to releases

2 participants