Skip to content

Commit d0b0375

Browse files
Alias @tailwindcss/upgrade to the latest tag (#15308)
When releasing a new beta version, we publish everything to a `next` tag, this is important so that you can still use `npm install tailwindcss` and get the current v3 instead of the beta v4 version. However, some packages don't have a meaning before the v4 release. This PR aliases the `next` tag to the `latest` tag for the following packages: - `@tailwindcss/upgrade` This in turn allow you to run `npx @tailwindcss/upgrade` for example, instead of using `npx @tailwindcss/upgrade@next`. --- > [!NOTE] > I actually have no idea how to properly test this without actually running it in CI. The `npm dist-tag` command doesn't have a `--dry-run` flag. Additionally, when running this command locally we have to authenticate (obviously) and in CI we typically don't have to do this because of the `NODE_AUTH_TOKEN` (at least that's the case when running `npm publish`) so I'm hoping this Just Works™ as expected. --------- Co-authored-by: Philipp Spiess <[email protected]>
1 parent 1566c3a commit d0b0375

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,13 @@ jobs:
248248
env:
249249
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
250250

251+
- name: Alias packages to `latest`
252+
if: ${{ inputs.release_channel == "next" }}
253+
run: |
254+
npm dist-tag add @tailwindcss/upgrade@${{ env.TAG_NAME }} latest
255+
env:
256+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
257+
251258
- name: Release
252259
uses: softprops/action-gh-release@v2
253260
with:

0 commit comments

Comments
 (0)