CI(GitHub Actions): Make publish via pnpm work

Summary:
/shrugs

Signed-off-by: Yongmin Hong <revi@omglol.email>

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
This commit is contained in:
revi 2024-08-01 19:06:02 +09:00
parent 8672f0b7bc
commit 9df5a0f602
Signed by: revi
GPG key ID: 1EB4F6CEEA100E94
3 changed files with 16 additions and 6 deletions

View file

@ -23,14 +23,15 @@ jobs:
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version-file: '.node-version' node-version-file: '.node-version'
cache: npm cache: pnpm
registry-url: 'https://registry.npmjs.org' registry-url: 'https://registry.npmjs.org'
- name: 'Install dependencies' - name: 'Install dependencies'
run: npm ci run: pnpm install
- name: 'Publish to npm' - name: 'Publish to npm'
run: npm publish --provenance --access public run: pnpm publish --provenance --access public
working-directory: './npm/eslint-config' working-directory: './npm/eslint-config'
env: env:
NPM_CONFIG_PROVENANCE: true
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
prettier-config: prettier-config:
@ -48,12 +49,13 @@ jobs:
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version-file: '.node-version' node-version-file: '.node-version'
cache: npm cache: pnpm
registry-url: 'https://registry.npmjs.org' registry-url: 'https://registry.npmjs.org'
- name: 'Install dependencies' - name: 'Install dependencies'
run: npm ci run: pnpm install
- name: 'Publish to npm' - name: 'Publish to npm'
run: npm publish --provenance --access public run: pnpm publish --provenance --access public
working-directory: './npm/prettier-config' working-directory: './npm/prettier-config'
env: env:
NPM_CONFIG_PROVENANCE: true
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

View file

@ -44,6 +44,10 @@
"email": "package-admin@revi.dev" "email": "package-admin@revi.dev"
}, },
"packageManager": "pnpm@9.6.0", "packageManager": "pnpm@9.6.0",
"publishConfig": {
"access": "public",
"provenance": true
},
"type": "module", "type": "module",
"license": "Apache-2.0" "license": "Apache-2.0"
} }

View file

@ -37,6 +37,10 @@
"prettier" "prettier"
], ],
"packageManager": "pnpm@9.6.0", "packageManager": "pnpm@9.6.0",
"publishConfig": {
"access": "public",
"provenance": true
},
"type": "module", "type": "module",
"funding": "https://github.com/sponsors/revi", "funding": "https://github.com/sponsors/revi",
"license": "Apache-2.0" "license": "Apache-2.0"