Skip to content

Commit cd7df43

Browse files
committed
🚀 meta: upgrade GitHub Actions to test across a wide variety of Node versions, operating systems, and Tailwind versions
1 parent c749618 commit cd7df43

File tree

2 files changed

+51
-24
lines changed

2 files changed

+51
-24
lines changed

‎.github/workflows/publish.yml‎

Lines changed: 0 additions & 24 deletions
This file was deleted.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Publish to NPM every tag (i.e. new version)
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
test:
10+
strategy:
11+
matrix:
12+
node-version: [12, 14]
13+
os: [ubuntu-latest, windows-latest, macOS-latest]
14+
tailwindcss-version: ["^1.9.5", "2.0.0-alpha.5"]
15+
runs-on: ${{ matrix.os }}
16+
timeout-minutes: 15
17+
steps:
18+
- uses: actions/checkout@v1
19+
- uses: actions/setup-node@v2-beta
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
registry-url: https://registry.npmjs.org/
23+
- uses: pnpm/action-setup@v1.2.0
24+
with:
25+
version: 5.10.x
26+
- run: pnpm install
27+
- run: pnpm uninstall tailwindcss
28+
- run: pnpm install --save tailwindcss@${{ matrix.tailwindcss-version }}
29+
- run: pnpm run test
30+
31+
publish:
32+
needs: test
33+
strategy:
34+
matrix:
35+
node-version: [14]
36+
os: [ubuntu-latest]
37+
runs-on: ${{ matrix.os }}
38+
timeout-minutes: 15
39+
steps:
40+
- uses: actions/checkout@v1
41+
- uses: actions/setup-node@v2-beta
42+
with:
43+
node-version: ${{ matrix.node-version }}
44+
registry-url: https://registry.npmjs.org/
45+
- uses: pnpm/action-setup@v1.2.0
46+
with:
47+
version: 5.10.x
48+
- run: pnpm install
49+
- run: npm publish
50+
env:
51+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)