File tree Expand file tree Collapse file tree 3 files changed +74
-4
lines changed Expand file tree Collapse file tree 3 files changed +74
-4
lines changed Original file line number Diff line number Diff line change 1+ name : Release - cli
2+
3+ on :
4+ workflow_dispatch :
5+ pull_request :
6+
7+ jobs :
8+ lint-all :
9+ if : startsWith(github.head_ref, 'release/')
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v3
13+ - name : Use Node.js 16.x
14+ uses : actions/setup-node@v3
15+ with :
16+ node-version : 16.x
17+ cache : npm
18+ - run : node ./bin/npm-cli.js run resetdeps
19+ - run : node ./bin/npm-cli.js run lint-all
20+
21+ prepublish :
22+ if : startsWith(github.head_ref, 'release/')
23+ runs-on : ubuntu-latest
24+ steps :
25+ - uses : actions/checkout@v3
26+ - name : Use Node.js 16.x
27+ uses : actions/setup-node@v3
28+ with :
29+ node-version : 16.x
30+ cache : npm
31+ - run : node ./bin/npm-cli.js run resetdeps
32+ - run : make prepublish
33+
34+ test-all :
35+ if : startsWith(github.head_ref, 'release/')
36+ strategy :
37+ fail-fast : false
38+ matrix :
39+ node-version :
40+ - 12.13.0
41+ - 12.x
42+ - 14.15.0
43+ - 14.x
44+ - 16.0.0
45+ - 16.x
46+ platform :
47+ - os : ubuntu-latest
48+ shell : bash
49+ - os : macos-latest
50+ shell : bash
51+ - os : windows-latest
52+ shell : cmd
53+ runs-on : ${{ matrix.platform.os }}
54+ defaults :
55+ run :
56+ shell : ${{ matrix.platform.shell }}
57+ steps :
58+ - uses : actions/checkout@v3
59+ - name : Use Node.js ${{ matrix.node-version }}
60+ uses : actions/setup-node@v3
61+ with :
62+ node-version : ${{ matrix.node-version }}
63+ cache : npm
64+ - run : node ./bin/npm-cli.js run resetdeps
65+ - run : node ./bin/npm-cli.js link -f --ignore-scripts
66+ - run : node ./bin/npm-cli.js run test-all --ignore-scripts
67+ - name : git status
68+ if : matrix.platform.os != 'windows-latest'
69+ run : node scripts/git-dirty.js
Original file line number Diff line number Diff line change @@ -101,10 +101,11 @@ link: uninstall
101101
102102prune : deps
103103 node bin/npm-cli.js prune --production --no-save --no-audit
104- @[[ " $( shell git status -s ) " != " " ]] && echo " ERR: found unpruned files " && exit 1 || echo " git status is clean "
104+ node scripts/ git-dirty.js
105105
106- publish : gitclean ls-ok link test smoke-tests docs prune
107- @git push origin :v$(shell node bin/npm-cli.js --no-timing -v) 2>&1 || true
106+ prepublish : gitclean ls-ok link test smoke-tests docs prune
107+
108+ publish : prepublish
108109 git push origin $(BRANCH ) && \
109110 git push origin --tags && \
110111 node bin/npm-cli.js publish --tag=$(PUBLISHTAG )
Original file line number Diff line number Diff line change 11#!/usr/bin/env node
22const { spawnSync } = require ( 'child_process' )
3- const changes = spawnSync ( 'git' , [ 'status' , '--porcelain' , '-uno ' ] )
3+ const changes = spawnSync ( 'git' , [ 'status' , '--porcelain' , '-uall ' ] )
44const stdout = changes . stdout . toString ( 'utf8' )
55const stderr = changes . stderr . toString ( 'utf8' )
66const { status, signal } = changes
You can’t perform that action at this time.
0 commit comments