Skip to content

Commit 9d96313

Browse files
authored
fix: revert publishing changes to fix release (#5364)
This reverts commit 65f77d9.
1 parent 6567e68 commit 9d96313

14 files changed

+45
-46
lines changed

.github/workflows/benchmark.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ jobs:
1515
- name: Use Node.js
1616
uses: actions/setup-node@v3
1717
with:
18-
node-version: lts/*
19-
cache: npm
18+
node-version: '*'
19+
cache: 'npm'
20+
cache-dependency-path: 'npm-shrinkwrap.json'
21+
check-latest: true
2022
- name: Install dependencies
2123
run: npm ci --no-audit && npm prune --production
2224
- name: Get size

.github/workflows/e2e-tests.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,14 @@ jobs:
3131
uses: actions/setup-node@v3
3232
with:
3333
node-version: ${{ matrix.node-version }}
34-
cache: npm
34+
cache: 'npm'
35+
cache-dependency-path: 'npm-shrinkwrap.json'
3536
check-latest: true
3637
- name: Cache verdaccio storage
3738
uses: actions/cache@v3
3839
with:
3940
path: ./.verdaccio-storage
40-
key: verdaccio-e2e-cli-${{ hashFiles('./package-lock.json') }}
41+
key: verdaccio-e2e-cli-${{ hashFiles('./npm-shrinkwrap.json') }}
4142
- name: Install dependencies
4243
run: npm ci --no-audit
4344
- name: Install pnpm

.github/workflows/integration-tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ jobs:
4747
uses: actions/setup-node@v3
4848
with:
4949
node-version: ${{ matrix.node-version }}
50-
cache: npm
50+
cache: 'npm'
51+
cache-dependency-path: 'npm-shrinkwrap.json'
5152
check-latest: true
5253
if: '${{!steps.release-check.outputs.IS_RELEASE}}'
5354
- name: Setup Deno

.github/workflows/legacy-tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ jobs:
4747
uses: actions/setup-node@v3
4848
with:
4949
node-version: ${{ matrix.node-version }}
50-
cache: npm
50+
cache: 'npm'
51+
cache-dependency-path: 'npm-shrinkwrap.json'
5152
check-latest: true
5253
if: '${{!steps.release-check.outputs.IS_RELEASE}}'
5354
- name: Setup Deno

.github/workflows/pre-release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ jobs:
1111
- uses: actions/checkout@v3
1212
- uses: actions/setup-node@v3
1313
with:
14-
node-version: lts/*
15-
cache: npm
14+
node-version: '*'
15+
cache: 'npm'
16+
check-latest: true
17+
cache-dependency-path: 'npm-shrinkwrap.json'
1618
registry-url: 'https://registry.npmjs.org'
1719
- name: Install core dependencies
1820
run: npm ci --no-audit

.github/workflows/release-please.yml

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,51 +4,41 @@ on:
44
branches:
55
- main
66
jobs:
7-
create-release:
7+
release-please:
88
runs-on: ubuntu-latest
9-
outputs:
10-
release_created: ${{ steps.release.outputs.release_created }}
119
steps:
1210
- uses: navikt/github-app-token-generator@a3831f44404199df32d8f39f7c0ad9bb8fa18b1c
1311
id: get-token
1412
with:
1513
private-key: ${{ secrets.TOKENS_PRIVATE_KEY }}
1614
app-id: ${{ secrets.TOKENS_APP_ID }}
17-
1815
- uses: GoogleCloudPlatform/release-please-action@v3
1916
id: release
2017
with:
2118
token: ${{ steps.get-token.outputs.token }}
2219
release-type: node
23-
package-name: netlify-cli
24-
25-
publish:
26-
runs-on: ubuntu-latest
27-
needs: create-release
28-
if: ${{ needs.create-release.outputs.release_created }}
29-
steps:
20+
package-name: 'netlify-cli'
3021
- uses: actions/checkout@v3
31-
22+
if: ${{ steps.release.outputs.release_created }}
3223
- uses: actions/setup-node@v3
3324
with:
34-
node-version: lts/*
35-
cache: npm
25+
node-version: '*'
26+
cache: 'npm'
27+
cache-dependency-path: 'npm-shrinkwrap.json'
28+
check-latest: true
3629
registry-url: 'https://registry.npmjs.org'
37-
38-
# when running npm publish dev dependencies won't be installed, but we need the is-ci binary to skip husky
39-
- name: Install is-ci globally
40-
run: npm install -g is-ci
41-
30+
if: ${{ steps.release.outputs.release_created }}
31+
# required for linting to pass
32+
- name: Install site dependencies
33+
run: npm run site:build:install
34+
if: ${{ steps.release.outputs.release_created }}
4235
- name: Install core dependencies
4336
run: npm ci --no-audit
44-
45-
# https://github.com/ossf/package-manager-best-practices/issues/35#issue-1360805761
46-
- name: Create shrinkwrap
47-
run: |
48-
npm prune --production
49-
rm -rf package-lock.json
50-
npm shrinkwrap
51-
37+
if: ${{ steps.release.outputs.release_created }}
5238
- run: npm publish
39+
if: ${{ steps.release.outputs.release_created }}
5340
env:
5441
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
42+
# required for tests to pass
43+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
44+
NETLIFY_TEST_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/unit-tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ jobs:
3030
uses: actions/setup-node@v3
3131
with:
3232
node-version: ${{ matrix.node-version }}
33-
cache: npm
33+
cache: 'npm'
34+
cache-dependency-path: 'npm-shrinkwrap.json'
3435
check-latest: true
3536
if: '${{!steps.release-check.outputs.IS_RELEASE}}'
3637
- name: Install core dependencies

.github/workflows/verify-docs.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ jobs:
1616
- name: Use Node.js
1717
uses: actions/setup-node@v3
1818
with:
19-
node-version: lts/*
20-
cache: npm
19+
node-version: '*'
20+
cache: 'npm'
21+
cache-dependency-path: 'npm-shrinkwrap.json'
22+
check-latest: true
2123
- name: Install core dependencies
2224
run: npm ci --no-audit
2325
- name: Install site dependencies

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
shrinkwrap=true

package-lock.json renamed to npm-shrinkwrap.json

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)