Skip to content

Commit 61a971b

Browse files
authored
Merge pull request #8 from tailwindlabs/release-insiders
Add release-insiders workflow
2 parents ee773a1 + 1848017 commit 61a971b

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Release Insiders
2+
3+
on:
4+
push:
5+
branches: [master]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
strategy:
12+
matrix:
13+
node-version: [12]
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
18+
- name: Use Node.js ${{ matrix.node-version }}
19+
uses: actions/setup-node@v2
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
registry-url: 'https://registry.npmjs.org'
23+
24+
- name: Use cached node_modules
25+
id: cache
26+
uses: actions/cache@v2
27+
with:
28+
path: node_modules
29+
key: nodeModules-${{ hashFiles('**/package-lock.json') }}-${{ matrix.node-version }}
30+
restore-keys: |
31+
nodeModules-
32+
33+
- name: Install dependencies
34+
if: steps.cache.outputs.cache-hit != 'true'
35+
run: npm install
36+
env:
37+
CI: true
38+
39+
- name: Resolve version
40+
id: vars
41+
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
42+
43+
- name: "Version based on commit: 0.0.0-insiders.${{ steps.vars.outputs.sha_short }}"
44+
run: npm version 0.0.0-insiders.${{ steps.vars.outputs.sha_short }} --force --no-git-tag-version
45+
46+
- name: Publish
47+
run: npm publish --tag insiders
48+
env:
49+
CI: true
50+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)