ckb-cell / rgbpp-sdk

Utilities for Bitcoin and RGB++ asset integration
ISC License
52 stars 16 forks source link

chore(ci): fix snapshot versioning #189

Closed ShookLyngs closed 2 months ago

ShookLyngs commented 2 months ago

Changes

Related 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, 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.

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

Run npx changeset version --snapshot snap
🦋  All files have been updated. Review them and commit at your leisure