Automatically trigger Tailwind Play PRs on release (#9601)
* trigger a Taiwind Play build on release * ensure version has quotes
This commit is contained in:
parent
b67f52cd57
commit
24fc365173
1 changed files with 18 additions and 1 deletions
19
.github/workflows/release.yml
vendored
19
.github/workflows/release.yml
vendored
|
|
@ -45,12 +45,29 @@ jobs:
|
|||
env:
|
||||
CI: true
|
||||
|
||||
- name: Calculate tag
|
||||
- name: Calculate environment variables
|
||||
run: |
|
||||
echo "tag_name=$(npm run calculate-tag-name --silent)" >> $GITHUB_ENV
|
||||
echo "tailwindcss_version=$(node -e 'console.log(require(`./package.json`).version);')" >> $GITHUB_ENV
|
||||
|
||||
- name: Publish
|
||||
run: npm publish --tag ${{ env.tag_name }}
|
||||
env:
|
||||
CI: true
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
- name: Trigger Tailwind Play update
|
||||
if: env.tag_name == 'latest'
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{ secrets.TAILWIND_PLAY_TOKEN }}
|
||||
script: |
|
||||
await github.rest.actions.createWorkflowDispatch({
|
||||
owner: 'tailwindlabs',
|
||||
repo: 'play.tailwindcss.com',
|
||||
ref: 'master',
|
||||
workflow_id: 'upgrade-tailwindcss.yml',
|
||||
inputs: {
|
||||
version: '${{ env.tailwindcss_version }}'
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue