- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 4.8k
 
Setup v4 releases #15961
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setup v4 releases #15961
Conversation
Trigger on pushes to the `next` branch, instead of relying on a manual workflow dispatch.
If a version is passed, all packages will be set to that version.
This was already done during the prepare release step
This was already done during the prepare release step.
This will compute the release channel we are interested in. Typically, this will be just `latest`, but could also be `beta` in case of `5.0.0-beta.2`
Or manual workflow_dispatch trigger.
This should not be necessary anymore, the NPM tag will be published based on the version in `package.json` of the `tailwindcss` package.
We will mostly always publish to `latest`, so this step is unnecessary.
| 
               | 
          ||
| const __dirname = path.dirname(url.fileURLToPath(import.meta.url)) | ||
| const root = path.resolve(__dirname, '..') | ||
| const version = process.argv[2] || null | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This just allows us to force a version without manually editing the versions. E.g.:
pnpm run version-packages 0.0.0-insiders.abc123
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ooh this is handy 💯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohh nice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't immediately find an option in pnpm to do that recursively, so thought to just add it to this little script 😄
For testing purposes only
This reverts commit 572dddf.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff!
| script: | | ||
| await github.rest.actions.createWorkflowDispatch({ | ||
| owner: 'tailwindlabs', | ||
| repo: 'play.tailwindcss.com', | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably need to update play so that it uses v4 config for the insider build after that release cc @thecrypticace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, @thecrypticace is aware of this 💪
Now that Tailwind CSS v4 is released, we can setup a proper release workflow again. This setup mimics the workflow of how we did it in v3, but adjusted to make it work on the v4 codebase.
Whenever a PR is merged into the
nextbranch, we will publish an insiders release to npm using the following version number:0.0.0-insiders.<commit-hash>. Note: insiders releases will not have a GitHub release associated with them, therefore thestandalone-cliwon't be available as an insiders release.For the normal release procedure, the following steps are required:
pnpm run version-packages)Next, a GitHub action will kick in once a
tagis being pushed.The GitHub action will run a build, and create a draft release on GitHub that will contain:
standalone-cliartifacts attached to the drafted releaseOnce you are happy with the draft, you can publish the draft on GitHub.
This in turn will trigger another GitHub action that will publish the packages to npm.
Whenever an insiders release or a normal release completes, we will also trigger Tailwind Play, to update its dependencies to the latest version of Tailwind CSS.
Note: some of the GitHub Action workflows still refer to the
nextbranch instead of themainbranch. If we later today want to get a new release out, we can mergenextintomainand update the workflows accordingly.This is hard to test, but I started from the existing release.yml file and adjusted things accordingly. The biggest change is related to the insiders version. If you look at this temporary commit, you can see that the publishing (dry-run) seems to work as expected:
