-
Notifications
You must be signed in to change notification settings - Fork 4
39 lines (37 loc) · 1.15 KB
/
deploy-package.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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 }}