Skip to content

Commit 68ffae0

Browse files
committed
chore: postinstall for dependabot template-oss PR
1 parent dfdb2f6 commit 68ffae0

File tree

6 files changed

+25
-66
lines changed

6 files changed

+25
-66
lines changed

.github/workflows/audit.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,7 @@ jobs:
3333
run: npm -v
3434
- name: Install Dependencies
3535
run: npm i --ignore-scripts --no-audit --no-fund --package-lock
36-
- name: Run Audit
37-
run: npm audit
36+
- name: Run Production Audit
37+
run: npm audit --omit=dev
38+
- name: Run Full Audit
39+
run: npm audit --audit-level=none

.github/workflows/ci-release.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
name: CI - Release
44

55
on:
6+
workflow_dispatch:
7+
inputs:
8+
ref:
9+
required: true
10+
type: string
11+
default: main
612
workflow_call:
713
inputs:
814
ref:
@@ -23,7 +29,7 @@ jobs:
2329
steps:
2430
- name: Get Workflow Job
2531
uses: actions/github-script@v6
26-
32+
if: inputs.check-sha
2733
id: check-output
2834
env:
2935
JOB_NAME: "Lint All"
@@ -57,7 +63,7 @@ jobs:
5763
- name: Create Check
5864
uses: LouisBrunner/[email protected]
5965
id: check
60-
66+
if: inputs.check-sha
6167
with:
6268
token: ${{ secrets.GITHUB_TOKEN }}
6369
status: in_progress
@@ -88,7 +94,7 @@ jobs:
8894
run: npm run postlint --ignore-scripts
8995
- name: Conclude Check
9096
uses: LouisBrunner/[email protected]
91-
if: always()
97+
if: steps.check.outputs.check_id && always()
9298
with:
9399
token: ${{ secrets.GITHUB_TOKEN }}
94100
conclusion: ${{ job.status }}
@@ -124,7 +130,7 @@ jobs:
124130
steps:
125131
- name: Get Workflow Job
126132
uses: actions/github-script@v6
127-
133+
if: inputs.check-sha
128134
id: check-output
129135
env:
130136
JOB_NAME: "Test All"
@@ -158,7 +164,7 @@ jobs:
158164
- name: Create Check
159165
uses: LouisBrunner/[email protected]
160166
id: check
161-
167+
if: inputs.check-sha
162168
with:
163169
token: ${{ secrets.GITHUB_TOKEN }}
164170
status: in_progress
@@ -203,7 +209,7 @@ jobs:
203209
run: npm test --ignore-scripts
204210
- name: Conclude Check
205211
uses: LouisBrunner/[email protected]
206-
if: always()
212+
if: steps.check.outputs.check_id && always()
207213
with:
208214
token: ${{ secrets.GITHUB_TOKEN }}
209215
conclusion: ${{ job.status }}

.github/workflows/ci.yml

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -14,56 +14,6 @@ on:
1414
- cron: "0 9 * * 1"
1515

1616
jobs:
17-
engines:
18-
name: Engines - ${{ matrix.platform.name }} - ${{ matrix.node-version }}
19-
if: github.repository_owner == 'npm'
20-
strategy:
21-
fail-fast: false
22-
matrix:
23-
platform:
24-
- name: Linux
25-
os: ubuntu-latest
26-
shell: bash
27-
node-version:
28-
- 14.17.0
29-
- 16.13.0
30-
- 18.0.0
31-
runs-on: ${{ matrix.platform.os }}
32-
defaults:
33-
run:
34-
shell: ${{ matrix.platform.shell }}
35-
steps:
36-
- name: Checkout
37-
uses: actions/checkout@v3
38-
- name: Setup Git User
39-
run: |
40-
git config --global user.email "[email protected]"
41-
git config --global user.name "npm CLI robot"
42-
- name: Setup Node
43-
uses: actions/setup-node@v3
44-
with:
45-
node-version: ${{ matrix.node-version }}
46-
- name: Update Windows npm
47-
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
48-
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12.') || startsWith(matrix.node-version, '14.'))
49-
run: |
50-
curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
51-
tar xf npm-7.5.4.tgz
52-
cd package
53-
node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
54-
cd ..
55-
rmdir /s /q package
56-
- name: Install npm@7
57-
if: startsWith(matrix.node-version, '10.')
58-
run: npm i --prefer-online --no-fund --no-audit -g npm@7
59-
- name: Install npm@latest
60-
if: ${{ !startsWith(matrix.node-version, '10.') }}
61-
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
62-
- name: npm Version
63-
run: npm -v
64-
- name: Install Dependencies
65-
run: npm i --ignore-scripts --no-audit --no-fund --engines-strict
66-
6717
lint:
6818
name: Lint
6919
if: github.repository_owner == 'npm'

.github/workflows/post-dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
if [[ "${{ steps.metadata.outputs.update-type }}" == "version-update:semver-major" ]]; then
7070
prefix='feat!'
7171
else
72-
prefix='chore!'
72+
prefix='chore'
7373
fi
7474
echo "::set-output name=message::$prefix: postinstall for dependabot template-oss PR"
7575

.github/workflows/release.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
branches:
99
- main
1010
- latest
11+
- release/v*
1112

1213
permissions:
1314
contents: write
@@ -88,7 +89,7 @@ jobs:
8889
return commentId
8990
- name: Get Workflow Job
9091
uses: actions/github-script@v6
91-
if: steps.release.outputs.pr-number
92+
if: steps.release.outputs.pr-sha
9293
id: check-output
9394
env:
9495
JOB_NAME: "Release"
@@ -122,7 +123,7 @@ jobs:
122123
- name: Create Check
123124
uses: LouisBrunner/[email protected]
124125
id: check
125-
if: steps.release.outputs.pr-number
126+
if: steps.release.outputs.pr-sha
126127
with:
127128
token: ${{ secrets.GITHUB_TOKEN }}
128129
status: in_progress
@@ -179,7 +180,7 @@ jobs:
179180
echo "::set-output name=sha::$(git rev-parse HEAD)"
180181
- name: Get Workflow Job
181182
uses: actions/github-script@v6
182-
183+
if: steps.commit.outputs.sha
183184
id: check-output
184185
env:
185186
JOB_NAME: "Update - Release"
@@ -213,7 +214,7 @@ jobs:
213214
- name: Create Check
214215
uses: LouisBrunner/[email protected]
215216
id: check
216-
217+
if: steps.commit.outputs.sha
217218
with:
218219
token: ${{ secrets.GITHUB_TOKEN }}
219220
status: in_progress
@@ -222,7 +223,7 @@ jobs:
222223
output: ${{ steps.check-output.outputs.result }}
223224
- name: Conclude Check
224225
uses: LouisBrunner/[email protected]
225-
if: always()
226+
if: needs.release.outputs.check-id && always()
226227
with:
227228
token: ${{ secrets.GITHUB_TOKEN }}
228229
conclusion: ${{ job.status }}
@@ -260,7 +261,7 @@ jobs:
260261
echo "::set-output name=result::$result"
261262
- name: Conclude Check
262263
uses: LouisBrunner/[email protected]
263-
if: always()
264+
if: needs.update.outputs.check-id && always()
264265
with:
265266
token: ${{ secrets.GITHUB_TOKEN }}
266267
conclusion: ${{ steps.needs-result.outputs.result }}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
},
5252
"templateOSS": {
5353
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
54-
"version": "4.6.2"
54+
"version": "4.8.0"
5555
},
5656
"tap": {
5757
"statements": 88,

0 commit comments

Comments
 (0)