|
| 1 | +name: Build Standalone CLI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - 'v*' |
| 7 | + |
| 8 | +env: |
| 9 | + CI: true |
| 10 | + |
| 11 | +jobs: |
| 12 | + build_cli: |
| 13 | + runs-on: macos-11 |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v2 |
| 16 | + |
| 17 | + - run: git fetch --tags |
| 18 | + |
| 19 | + - name: Resolve version |
| 20 | + id: vars |
| 21 | + run: echo "::set-output name=tag_name::$(git describe --tags --abbrev=0)" |
| 22 | + |
| 23 | + - name: Use Node.js 16 |
| 24 | + uses: actions/setup-node@v2 |
| 25 | + with: |
| 26 | + node-version: '16' |
| 27 | + registry-url: 'https://registry.npmjs.org' |
| 28 | + |
| 29 | + - name: Build tailwindcss |
| 30 | + run: npm run prepublishOnly |
| 31 | + |
| 32 | + - name: Install standalone cli dependencies |
| 33 | + run: npm install |
| 34 | + working-directory: standalone-cli |
| 35 | + |
| 36 | + - name: Build standalone cli |
| 37 | + run: npm run build |
| 38 | + working-directory: standalone-cli |
| 39 | + |
| 40 | + - name: Test |
| 41 | + run: npm test |
| 42 | + working-directory: standalone-cli |
| 43 | + |
| 44 | + - name: Release |
| 45 | + uses: softprops/action-gh-release@v1 |
| 46 | + with: |
| 47 | + draft: true |
| 48 | + tag_name: ${{ steps.vars.outputs.tag_name }} |
| 49 | + body: | |
| 50 | + * [Linux (x64)](https://github.com/tailwindlabs/tailwindcss/releases/download/${{ steps.vars.outputs.tag_name }}/tailwindcss-linux-x64) |
| 51 | + * [macOS (arm64)](https://github.com/tailwindlabs/tailwindcss/releases/download/${{ steps.vars.outputs.tag_name }}/tailwindcss-macos-arm64) |
| 52 | + * [macOS (x64)](https://github.com/tailwindlabs/tailwindcss/releases/download/${{ steps.vars.outputs.tag_name }}/tailwindcss-macos-x64) |
| 53 | + * [Windows (x64)](https://github.com/tailwindlabs/tailwindcss/releases/download/${{ steps.vars.outputs.tag_name }}/tailwindcss-windows-x64.exe) |
| 54 | + files: | |
| 55 | + dist/tailwindcss-linux-x64 |
| 56 | + dist/tailwindcss-macos-arm64 |
| 57 | + dist/tailwindcss-macos-x64 |
| 58 | + dist/tailwindcss-windows-x64.exe |
0 commit comments