Skip to content

Commit 071f463

Browse files
authored
Merge pull request #490 from drizzle-team/npm-provenance
2 parents ad72b8a + 02afb6c commit 071f463

File tree

4 files changed

+55
-4
lines changed

4 files changed

+55
-4
lines changed

.github/workflows/release-feature-branch.yaml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,40 @@ jobs:
1616
- drizzle-orm
1717
- drizzle-zod
1818
runs-on: ubuntu-20.04
19+
permissions:
20+
contents: read
21+
id-token: write
1922
steps:
2023
- uses: actions/checkout@v3
2124

2225
- uses: actions/setup-node@v3
2326
with:
24-
node-version: 16
27+
node-version: 19
2528
registry-url: 'https://registry.npmjs.org'
2629

2730
- uses: pnpm/action-setup@v2
31+
name: Install pnpm
32+
id: pnpm-install
2833
with:
2934
version: latest
30-
run_install: true
35+
run_install: false
36+
37+
- name: Get pnpm store directory
38+
id: pnpm-cache
39+
shell: bash
40+
run: |
41+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
42+
43+
- uses: actions/cache@v3
44+
name: Setup pnpm cache
45+
with:
46+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
47+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
48+
restore-keys: |
49+
${{ runner.os }}-pnpm-store-
50+
51+
- name: Install dependencies
52+
run: pnpm install
3153

3254
- name: Build (for fork PRs only)
3355
if: github.event_name == 'pull_request'

.github/workflows/release-latest.yaml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,32 @@ jobs:
1717

1818
- uses: actions/setup-node@v3
1919
with:
20-
node-version: 16
20+
node-version: 19
2121
registry-url: 'https://registry.npmjs.org'
2222

2323
- uses: pnpm/action-setup@v2
24+
name: Install pnpm
25+
id: pnpm-install
2426
with:
2527
version: latest
26-
run_install: true
28+
run_install: false
29+
30+
- name: Get pnpm store directory
31+
id: pnpm-cache
32+
shell: bash
33+
run: |
34+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
35+
36+
- uses: actions/cache@v3
37+
name: Setup pnpm cache
38+
with:
39+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
40+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
41+
restore-keys: |
42+
${{ runner.os }}-pnpm-store-
43+
44+
- name: Install dependencies
45+
run: pnpm install
2746

2847
- name: Check preconditions
2948
id: checks

drizzle-orm/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
"pack": "cp package.json dist/ && (cd dist && npm pack --pack-destination ..) && rm -f package.tgz && mv *.tgz package.tgz",
1010
"publish": "npm publish package.tgz"
1111
},
12+
"publishConfig": {
13+
"provenance": true
14+
},
1215
"repository": {
1316
"type": "git",
1417
"url": "git+https://github.com/drizzle-team/drizzle-orm.git"

drizzle-zod/package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@
99
"publish": "npm publish package.tgz",
1010
"test": "ava tests"
1111
},
12+
"publishConfig": {
13+
"provenance": true
14+
},
15+
"repository": {
16+
"type": "git",
17+
"url": "git+https://github.com/drizzle-team/drizzle-orm.git"
18+
},
1219
"ava": {
1320
"files": [
1421
"tests/**/*.test.ts",

0 commit comments

Comments
 (0)