generated from nl-design-system/example
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update `package.json`: - Update "engines.pnpm" to only allow pnpm v9 because the lockfile version is not compatible with pnpm v8 - Update "engines.node" to only allow Node.js 20 which is the current LTS version. Node.js v21 is no longer officially supported. - Add "packageManager" for use with Vercel as well as the "pnpm/action-setup" Update `.github/workflows/continuous-deployment.yml`: - Remove "version" input from "pnpm/action-setup" because it will pick up the pnpm version from package.json#packageManager Use hashes to pin GitHub Actions to prevent tampering. Tags are added ascomments. Dependabot will update both in pull requests. Update all actions to their latest versions. Make it explicit that `--frozen-lockfile` is used when running `pnpm install` in CI.
- Loading branch information
Showing
2 changed files
with
34 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,22 +12,20 @@ jobs: | |
|
||
steps: | ||
- name: Checkout branch | ||
uses: actions/[email protected].2 | ||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | ||
|
||
- name: Install pnpm package manager | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 8.14 | ||
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 | ||
|
||
- name: Set up Node.js version | ||
uses: actions/[email protected] | ||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | ||
with: | ||
node-version-file: .nvmrc | ||
cache: pnpm | ||
|
||
- name: Install dependencies | ||
run: | | ||
pnpm install | ||
pnpm install --frozen-lockfile | ||
pnpm ls --recursive | ||
lint: | ||
|
@@ -36,70 +34,60 @@ jobs: | |
|
||
steps: | ||
- name: Checkout branch | ||
uses: actions/[email protected].2 | ||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | ||
|
||
- name: Install pnpm package manager | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 8.14 | ||
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 | ||
|
||
- name: Set up Node.js version | ||
uses: actions/[email protected] | ||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | ||
with: | ||
node-version-file: .nvmrc | ||
cache: pnpm | ||
|
||
- name: Install dependencies | ||
run: | | ||
pnpm install | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: "Continuous Integration: lint" | ||
run: | | ||
pnpm run --if-present lint | ||
run: pnpm run --if-present lint | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
needs: install | ||
|
||
steps: | ||
- name: Checkout branch | ||
uses: actions/[email protected].2 | ||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | ||
|
||
- name: Install pnpm package manager | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 8.14 | ||
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 | ||
|
||
- name: Set up Node.js version | ||
uses: actions/[email protected] | ||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | ||
with: | ||
node-version-file: .nvmrc | ||
cache: pnpm | ||
|
||
- name: Install dependencies | ||
run: | | ||
pnpm install | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: "Continuous Integration: build" | ||
env: | ||
BASE_URL: "/utrecht/" | ||
run: | | ||
pnpm run --if-present build | ||
run: pnpm run --if-present build | ||
|
||
- name: "Continuous Integration: lint build" | ||
env: | ||
BASE_URL: "/utrecht/" | ||
run: | | ||
pnpm run --if-present lint-build | ||
run: pnpm run --if-present lint-build | ||
|
||
- name: "Continuous Integration: test build" | ||
env: | ||
BASE_URL: "/utrecht/" | ||
run: | | ||
pnpm run --if-present test-build | ||
run: pnpm run --if-present test-build | ||
|
||
- name: "Retain build artifact: storybook" | ||
uses: actions/[email protected].1 | ||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | ||
with: | ||
name: storybook | ||
path: packages/storybook/dist/ | ||
|
@@ -111,26 +99,22 @@ jobs: | |
|
||
steps: | ||
- name: Checkout branch | ||
uses: actions/[email protected].2 | ||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | ||
|
||
- name: Install pnpm package manager | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 8.14 | ||
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 | ||
|
||
- name: Set up Node.js version | ||
uses: actions/[email protected] | ||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | ||
with: | ||
node-version-file: .nvmrc | ||
cache: pnpm | ||
|
||
- name: Install dependencies | ||
run: | | ||
pnpm install | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: "Continuous Integration: test" | ||
run: | | ||
pnpm run --if-present test | ||
run: pnpm run --if-present test | ||
|
||
publish-website: | ||
runs-on: ubuntu-latest | ||
|
@@ -139,16 +123,16 @@ jobs: | |
|
||
steps: | ||
- name: Checkout release branch | ||
uses: actions/[email protected].2 | ||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | ||
|
||
- name: "Restore build artifact: Storybook" | ||
uses: actions/[email protected].4 | ||
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 | ||
with: | ||
name: storybook | ||
path: packages/storybook/dist/ | ||
|
||
- name: Continuous Deployment to GitHub Pages | ||
uses: JamesIves/github-pages-deploy-action@v4.5.0 | ||
uses: JamesIves/github-pages-deploy-action@5c6e9e9f3672ce8fd37b9856193d2a537941e66c # v4.6.1 | ||
with: | ||
branch: gh-pages | ||
folder: packages/storybook/dist/ | ||
|
@@ -160,29 +144,26 @@ jobs: | |
|
||
steps: | ||
- name: Checkout release branch | ||
uses: actions/[email protected].2 | ||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | ||
with: | ||
token: ${{ secrets.GH_TOKEN }} | ||
|
||
- name: Install pnpm package manager | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 8.14 | ||
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 | ||
|
||
- name: Set up Node.js version | ||
uses: actions/[email protected] | ||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | ||
with: | ||
node-version-file: .nvmrc | ||
cache: pnpm | ||
|
||
- name: "Continuous Deployment: install" | ||
run: | | ||
pnpm install | ||
pnpm install --frozen-lockfile | ||
pnpm ls --recursive | ||
- name: "Continuous Deployment: build" | ||
run: | | ||
pnpm run --if-present build | ||
run: pnpm run --if-present build | ||
|
||
- name: "Continuous Deployment: publish to GitHub repository" | ||
env: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,8 +9,8 @@ | |
], | ||
"private": true, | ||
"engines": { | ||
"node": "^20 || ^21", | ||
"pnpm": "^8 || ^9" | ||
"node": "^20", | ||
"pnpm": "^9" | ||
}, | ||
"workspaces": [ | ||
"./packages/*", | ||
|
@@ -75,5 +75,6 @@ | |
}, | ||
"dependencies": { | ||
"http-server": "14.1.1" | ||
} | ||
}, | ||
"packageManager": "[email protected]+sha256.19c17528f9ca20bd442e4ca42f00f1b9808a9cb419383cd04ba32ef19322aba7" | ||
} |