Skip to content

Commit 24fc365

Browse files
authored
Automatically trigger Tailwind Play PRs on release (#9601)
* trigger a Taiwind Play build on release * ensure version has quotes
1 parent b67f52c commit 24fc365

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/workflows/release.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,29 @@ jobs:
4545
env:
4646
CI: true
4747

48-
- name: Calculate tag
48+
- name: Calculate environment variables
4949
run: |
5050
echo "tag_name=$(npm run calculate-tag-name --silent)" >> $GITHUB_ENV
51+
echo "tailwindcss_version=$(node -e 'console.log(require(`./package.json`).version);')" >> $GITHUB_ENV
5152
5253
- name: Publish
5354
run: npm publish --tag ${{ env.tag_name }}
5455
env:
5556
CI: true
5657
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
58+
59+
- name: Trigger Tailwind Play update
60+
if: env.tag_name == 'latest'
61+
uses: actions/github-script@v6
62+
with:
63+
github-token: ${{ secrets.TAILWIND_PLAY_TOKEN }}
64+
script: |
65+
await github.rest.actions.createWorkflowDispatch({
66+
owner: 'tailwindlabs',
67+
repo: 'play.tailwindcss.com',
68+
ref: 'master',
69+
workflow_id: 'upgrade-tailwindcss.yml',
70+
inputs: {
71+
version: '${{ env.tailwindcss_version }}'
72+
}
73+
})

0 commit comments

Comments
 (0)