From 9df5a0f602395d53b728bf9893d14ab287c3e19d Mon Sep 17 00:00:00 2001 From: Yongmin Hong Date: Thu, 1 Aug 2024 19:06:02 +0900 Subject: [PATCH] CI(GitHub Actions): Make publish via pnpm work Summary: /shrugs Signed-off-by: Yongmin Hong Test Plan: land and push tag again Reviewers: O1 revi & automations, revi Reviewed By: O1 revi & automations, revi Differential Revision: https://issuetracker.revi.xyz/D634 --- .github/workflows/npm-pub.yml | 14 ++++++++------ npm/eslint-config/package.json | 4 ++++ npm/prettier-config/package.json | 4 ++++ 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/npm-pub.yml b/.github/workflows/npm-pub.yml index 7ef30d8..cb3cfd0 100644 --- a/.github/workflows/npm-pub.yml +++ b/.github/workflows/npm-pub.yml @@ -23,14 +23,15 @@ jobs: uses: actions/setup-node@v4 with: node-version-file: '.node-version' - cache: npm + cache: pnpm registry-url: 'https://registry.npmjs.org' - name: 'Install dependencies' - run: npm ci + run: pnpm install - name: 'Publish to npm' - run: npm publish --provenance --access public + run: pnpm publish --provenance --access public working-directory: './npm/eslint-config' env: + NPM_CONFIG_PROVENANCE: true NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} prettier-config: @@ -48,12 +49,13 @@ jobs: uses: actions/setup-node@v4 with: node-version-file: '.node-version' - cache: npm + cache: pnpm registry-url: 'https://registry.npmjs.org' - name: 'Install dependencies' - run: npm ci + run: pnpm install - name: 'Publish to npm' - run: npm publish --provenance --access public + run: pnpm publish --provenance --access public working-directory: './npm/prettier-config' env: + NPM_CONFIG_PROVENANCE: true NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/npm/eslint-config/package.json b/npm/eslint-config/package.json index bfaca03..e156d19 100644 --- a/npm/eslint-config/package.json +++ b/npm/eslint-config/package.json @@ -44,6 +44,10 @@ "email": "package-admin@revi.dev" }, "packageManager": "pnpm@9.6.0", + "publishConfig": { + "access": "public", + "provenance": true + }, "type": "module", "license": "Apache-2.0" } diff --git a/npm/prettier-config/package.json b/npm/prettier-config/package.json index 4312c57..9e9ac57 100644 --- a/npm/prettier-config/package.json +++ b/npm/prettier-config/package.json @@ -37,6 +37,10 @@ "prettier" ], "packageManager": "pnpm@9.6.0", + "publishConfig": { + "access": "public", + "provenance": true + }, "type": "module", "funding": "https://github.com/sponsors/revi", "license": "Apache-2.0"