From d0b0375d00994bac8caa6364bcbf1ff12944a40c Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Mon, 9 Dec 2024 13:11:41 +0100 Subject: [PATCH] Alias `@tailwindcss/upgrade` to the latest tag (#15308) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .github/workflows/release.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f58660ae1..64abf817a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -248,6 +248,13 @@ jobs: env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Alias packages to `latest` + if: ${{ inputs.release_channel == "next" }} + run: | + npm dist-tag add @tailwindcss/upgrade@${{ env.TAG_NAME }} latest + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Release uses: softprops/action-gh-release@v2 with: