Skip to content

Commit

Permalink
build: update pnpm to v9 and update actions
Browse files Browse the repository at this point in the history
Update pnpm to v9 and remove the "version" input from
"pnpm/action-setup" as that will now use the "packageManager" field from
`package.json`.

Add `ENABLE_EXPERIMENTAL_COREPACK=1` environment variable to the build
environment on Vercel to make sure Vercel uses corepack for the correct
version of pnpm.

Update all actions to their latest versions using hashes to prevent
tampering.
  • Loading branch information
matijs authored and Robbert committed May 22, 2024
1 parent 15f8609 commit 08c8bea
Show file tree
Hide file tree
Showing 3 changed files with 7,027 additions and 5,802 deletions.
27 changes: 11 additions & 16 deletions .github/workflows/continuous-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,33 @@ jobs:

steps:
- name: Checkout branch
uses: actions/checkout@v4
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
- name: "Continuous Integration: lint"
run: |
pnpm run --if-present lint
run: pnpm run --if-present lint

- name: "Continuous Integration: build"
run: |
pnpm run --if-present build
run: pnpm run --if-present build

- name: "Continuous Integration: test"
run: |
pnpm run --if-present test
run: pnpm run --if-present test

- name: "Retain build artifacts"
uses: actions/[email protected].1
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: dist
path: dist/
Expand All @@ -56,16 +51,16 @@ jobs:

steps:
- name: Checkout branch
uses: actions/checkout@v4.0.2
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6

- name: "Restore build artifacts"
uses: actions/[email protected].4
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: dist
path: 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: dist/my-app/
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license": "EUPL-1.2",
"engines": {
"node": "^20",
"pnpm": "^8"
"pnpm": "^9"
},
"scripts": {
"start": "ng serve",
Expand Down Expand Up @@ -72,5 +72,6 @@
"protractor": "7.0.0",
"ts-node": "10.9.2",
"typescript": "5.4.5"
}
},
"packageManager": "[email protected]+sha256.19c17528f9ca20bd442e4ca42f00f1b9808a9cb419383cd04ba32ef19322aba7"
}
Loading

0 comments on commit 08c8bea

Please sign in to comment.