Skip to content

Commit 4550cc6

Browse files
authored
Merge pull request #8 from foxglove/nick/inf-65-update-npm-publish-workflows-to-use-trusted-publishing
Enable NPM trusted publishing with OIDC
2 parents 8768c3f + 3b4ef98 commit 4550cc6

File tree

6 files changed

+5795
-3807
lines changed

6 files changed

+5795
-3807
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,25 @@ jobs:
1212
name: push
1313
runs-on: ubuntu-latest
1414

15+
permissions:
16+
contents: read
17+
# https://docs.npmjs.com/generating-provenance-statements#publishing-packages-with-provenance-via-github-actions
18+
id-token: write
19+
1520
steps:
16-
- uses: actions/checkout@v2
17-
- uses: actions/setup-node@v2
21+
- uses: actions/checkout@v6
22+
- run: corepack enable
23+
- uses: actions/setup-node@v6
1824
with:
19-
node-version: 16.x
25+
node-version: 22.x
2026
registry-url: https://registry.npmjs.org
27+
cache: yarn
2128

22-
- run: yarn install --frozen-lockfile
29+
- run: yarn install --immutable
2330
- run: yarn run build
2431
- run: yarn run lint:ci
2532
- run: yarn run test
2633

2734
- name: Publish to NPM
2835
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
29-
run: yarn publish --access public
30-
env:
31-
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
36+
run: yarn npm publish --provenance --access public

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,12 @@ dist
105105

106106
# MacOS
107107
.DS_Store
108+
109+
# Yarn
110+
.yarn/*
111+
!.yarn/patches
112+
!.yarn/plugins
113+
!.yarn/releases
114+
!.yarn/sdks
115+
!.yarn/versions
116+
.pnp.*

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// -*- jsonc -*-
22
{
33
"editor.codeActionsOnSave": {
4-
"source.fixAll.eslint": true
4+
"source.fixAll.eslint": "explicit"
55
},
66
"editor.defaultFormatter": "esbenp.prettier-vscode",
77
"editor.formatOnSave": true,

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

package.json

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "@foxglove/velodyne-cloud",
33
"version": "1.0.1",
4+
"packageManager": "yarn@4.9.1",
45
"description": "TypeScript library for converting Velodyne LIDAR packet data to point clouds",
56
"license": "MIT",
67
"keywords": [
@@ -36,24 +37,21 @@
3637
"node": ">= 14"
3738
},
3839
"devDependencies": {
39-
"@foxglove/eslint-plugin": "0.13.0",
40-
"@types/eslint": "^7",
41-
"@types/eslint-plugin-prettier": "^3",
42-
"@types/jest": "^26.0.23",
43-
"@types/node": "^16.3.3",
44-
"@types/prettier": "2.3.2",
45-
"@typescript-eslint/eslint-plugin": "4.28.3",
46-
"@typescript-eslint/parser": "4.28.3",
47-
"eslint": "7.31.0",
48-
"eslint-config-prettier": "8.3.0",
40+
"@foxglove/eslint-plugin": "0.21.0",
41+
"@types/jest": "29.5.14",
42+
"@typescript-eslint/eslint-plugin": "5.62.0",
43+
"@typescript-eslint/parser": "5.62.0",
44+
"eslint": "8.57.0",
45+
"eslint-config-prettier": "9.1.0",
46+
"eslint-plugin-es": "4.1.0",
4947
"eslint-plugin-filenames": "1.3.2",
50-
"eslint-plugin-import": "2.23.4",
51-
"eslint-plugin-jest": "24.3.6",
52-
"eslint-plugin-prettier": "3.4.0",
53-
"jest": "27.0.6",
48+
"eslint-plugin-import": "2.31.0",
49+
"eslint-plugin-jest": "27.9.0",
50+
"eslint-plugin-prettier": "5.2.1",
51+
"jest": "29.7.0",
5452
"kelonio": "0.6.0",
55-
"prettier": "2.3.2",
56-
"ts-jest": "^27.0.3",
57-
"typescript": "4.3.5"
53+
"prettier": "3.5.1",
54+
"ts-jest": "29.2.5",
55+
"typescript": "5.7.3"
5856
}
5957
}

0 commit comments

Comments
 (0)