Skip to content

Deploy to NPM

Deploy to NPM #181

name: Deploy to NPM
on:
workflow_dispatch:
schedule:
- cron: "0 12 * * MON"
jobs:
deploy:
runs-on: ubuntu-24.04
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/[email protected]
with:
fetch-depth: "0"
persist-credentials: false
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Git Identity
run: |
git config --global user.name 'scaleway-bot'
git config --global user.email '[email protected]'
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/$GITHUB_REPOSITORY
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- uses: pnpm/[email protected]
- name: Use Node.js
uses: actions/[email protected]
with:
node-version: 20
check-latest: true
- run: pnpm install
- run: pnpm run build
- run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: pnpm lerna publish -y --create-release github
env:
HUSKY: 0
GH_TOKEN: ${{ secrets.GH_TOKEN }}