@@ -24,47 +24,61 @@ jobs:
2424 with :
2525 repository : tailwindlabs/tailwindcss
2626
27- - name : Check if we already have this version
28- id : check-version
27+ - name : Strip leading "v" from version
28+ id : strip-v
2929 run : |
3030 # Get TailwindCSS version (e.g. "v4.1.7")
3131 tailwind_version="${{ steps.get-latest-release.outputs.release }}"
32- echo "tailwind_version=${tailwind_version}" >> $GITHUB_OUTPUT
33-
34- # Check if we already have a tag for this version
35- if git tag -l | grep -q "^${tailwind_version}$"; then
32+ # Remove leading "v" (e.g. "4.1.7")
33+ clean_version="${tailwind_version#v}"
34+ echo "full_version=${tailwind_version}" >> $GITHUB_OUTPUT
35+ echo "clean_version=${clean_version}" >> $GITHUB_OUTPUT
36+
37+ - name : Check if we already have this version
38+ id : check-version
39+ run : |
40+ # Check if we already have a tag for this version (without "v")
41+ version="${{ steps.strip-v.outputs.clean_version }}"
42+ if git tag -l | grep -q "^${version}$"; then
3643 echo "exists=true" >> $GITHUB_OUTPUT
37- echo "Tag ${tailwind_version } already exists"
44+ echo "Tag ${version } already exists"
3845 else
3946 echo "exists=false" >> $GITHUB_OUTPUT
40- echo "Tag ${tailwind_version } does not exist, will create"
47+ echo "Tag ${version } does not exist, will create"
4148 fi
4249
4350 - name : Create and push new tag
4451 if : steps.check-version.outputs.exists == 'false'
4552 run : |
46- version="${{ steps.check-version .outputs.tailwind_version }}"
53+ version="${{ steps.strip-v .outputs.clean_version }}"
4754 git config user.name "github-actions[bot]"
4855 git config user.email "github-actions[bot]@users.noreply.github.com"
49- git tag -a "${version}" -m "Auto-release for TailwindCSS ${version }"
56+ git tag -a "${version}" -m "Auto-release for TailwindCSS ${{ steps.strip-v.outputs.full_version } }"
5057 git push origin "${version}"
5158
5259 - name : Create GitHub Release
5360 if : steps.check-version.outputs.exists == 'false'
5461 uses : softprops/action-gh-release@v1
5562 with :
56- tag_name : ${{ steps.check-version .outputs.tailwind_version }}
57- name : ${{ steps.check-version .outputs.tailwind_version }}
63+ tag_name : ${{ steps.strip-v .outputs.clean_version }}
64+ name : ${{ steps.strip-v .outputs.full_version }}
5865 body : |
59- Automatic release for TailwindCSS ${{ steps.check-version.outputs.tailwind_version }}
66+ Automatic Go Tool release for TailwindCSS ${{ steps.strip-v.outputs.full_version }} standalone CLI.
67+
68+ 1. Install it:
69+ ```bash
70+ go get -tool github.com/scriptogre/tailwindcss-go-tool@${{ steps.strip-v.outputs.clean_version }}
71+ ```
6072
61- ## Usage
62- ```bash
63- go get -tool github.com/scriptogre/tailwindcss-go-tool@${{ steps.check-version.outputs.tailwind_version }}
64- go tool tailwindcss --help
65- ```
73+ 2. Create `input.css` in your project:
74+ ```css
75+ @import 'tailwindcss';
76+ ```
6677
67- This version includes TailwindCSS CLI ${{ steps.check-version.outputs.tailwind_version }}.
78+ 3. Run it:
79+ ```bash
80+ go tool tailwindcss -i input.css -o output.css --watch
81+ ```
6882 draft : false
6983 prerelease : false
7084 env :
0 commit comments