Ensure release asset is attached properly to the release #870
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the Change
We've had a long-standing issue where our GitHub Workflow that is supposed to build a final release asset and attach that to a published release has not been working (in fact, it doesn't run at all). We've attempted to fix this a few times but nothing has worked. Did another dive today and I think I've figured out the problem:
develop
develop
intotrunk
trunk
that will build the code and push that to ourstable
branchstable
branch for that releaseI believe the issue here is that when we build the code to push to the
stable
branch, we remove any files that we don't want in the final release, based on our.gitattributes
file. This will include removing the.github/workflows
directory. So when the release is published, thestable
branch won't contain any of those workflow files and thus the workflow won't ever run.I compared this to how we do things on Distributor and I do see the
.github/workflows
directory and.gitattributes
file in thestable
branch, whereas we don't see that in this repo.So this PR attempts to fix things by adding the
.github/workflows
directory and.gitattributes
file into the code we push to thestable
branch. When the release workflow runs, it should remove those when it runsnpm run archive
, so the release that gets attached shouldn't have those files.In addition, to ensure those files don't end up in the release we send people when they sign up (or any updates we push out to them), we've changed our updater to pull the release asset, which matches what we do on Distributor.
How to test the Change
Not a great way to test this until we push out a new release. You can run all the release commands locally and ensure those work as expected:
Changelog Entry
Credits
Props @dkotter
Checklist: