Fix #163 by ensuring a temp changeset is always added before the changeset version command is executed
Fix snapshot versioning by reverting code, should not run version command in the changesets/action
Related issues
Resolves #163
Proof
When releasing snapshots, we expect each package to be versioned as 0.0.0-snap-{timestamp}, and things should work as expected if the .changeset folder contains at least one changeset. If the condition has not been met, the changeset version command will be skipped, which causes the versions of the packages and the changelog file remain the same as before.
An example of skipping (which causes the #163 issue):
% changeset version --snapshot snap
🦋 warn No unreleased changesets found, exiting.
To address the issue, an extra step has been added to the snapshot.yml workflow to always add a temp changest before executing the changeset version command. This extra step ensures the versioning command will always updates the versions of the packages, instead of doing nothing.
Changes
changeset version
command is executedRelated issues
Proof
When releasing snapshots, we expect each package to be versioned as
0.0.0-snap-{timestamp}
, and things should work as expected if the.changeset
folder contains at least one changeset. If the condition has not been met, thechangeset version
command will be skipped, which causes the versions of the packages and the changelog file remain the same as before.An example of skipping (which causes the #163 issue):
To address the issue, an extra step has been added to the
snapshot.yml
workflow to always add a temp changest before executing thechangeset version
command. This extra step ensures the versioning command will always updates the versions of the packages, instead of doing nothing.Here's an example action where the repo contains no changeset in the
.changeset
folder, even though the versioning command worked and the snapshot was released successfully. Therefore I believe the issue is considered resolved: https://github.com/ShookLyngs/test-changesets/actions/runs/9214982527/job/25352404438#step:9:9