almond-bongbong / react-slot-counter

🚀 Elevate Your UI with Dynamic, Eye-Catching Counters
https://almond-bongbong.github.io/react-slot-counter/
112 stars 12 forks source link

:sparkles: Add pre-release support in GitHub Actions #45

Closed almond-bongbong closed 5 months ago

almond-bongbong commented 5 months ago

Description:

This PR updates the GitHub Actions script to support the publishing of pre-release versions. By determining the appropriate NPM tag based on the release tag, we can effectively manage beta, RC, alpha, and other pre-release versions.

Changes:

Added Determine NPM tag step:

Extracts the NPM tag from the release tag. For example, if the release tag is v1.0.0-beta.1, it sets the NPM tag to beta. If no tag is specified, it defaults to latest. Updated Publish to GitHub Packages step:

Modified the npm publish command to include the appropriate NPM tag determined in the previous step.

Details:

The determine NPM tag step analyzes the GitHub release tag and sets the NPM tag accordingly. If the release tag follows the format v1.0.0-beta.1, the NPM tag beta is set. If no specific tag is found, it defaults to latest. When publishing the package, the npm publish command now includes the determined tag.