From cd3fed995bd21e3284a2956cfc2e7d89faf86b3b Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Tue, 18 Oct 2022 15:35:16 +0200 Subject: [PATCH 1/2] trigger a Taiwind Play build on release --- .github/workflows/release.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fa52adb78251..faded374701e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 }} + } + }) From 720760977a14bcaeb6e2ee8f8a491387edc721ab Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Tue, 18 Oct 2022 16:02:26 +0200 Subject: [PATCH 2/2] ensure version has quotes --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index faded374701e..e54466bdb69c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -68,6 +68,6 @@ jobs: ref: 'master', workflow_id: 'upgrade-tailwindcss.yml', inputs: { - version: ${{ env.tailwindcss_version }} + version: '${{ env.tailwindcss_version }}' } })