Publish to NPM #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish to NPM | |
permissions: | |
contents: write | |
# Manually triggered workflow | |
on: | |
workflow_dispatch: {} | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [22] | |
package-dir: [js] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
env: | |
GH_TOKEN: ${{ github.token }} | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install dependencies | |
working-directory: ./${{ matrix.package-dir }} | |
run: npm install | |
- name: Lint | |
working-directory: ./${{ matrix.package-dir }} | |
run: npm run lint | |
- name: Configure Git | |
run: | | |
git config --global user.email "hi@reclaimprotocol.org" | |
git config --global user.name "Reclaim CI" | |
- name: Publish to NPM | |
working-directory: ./${{ matrix.package-dir }} | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: npm run publish:pkg |