-
-
Notifications
You must be signed in to change notification settings - Fork 10
60 lines (48 loc) · 1.93 KB
/
publish-test.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: npm-publish-test
on:
push:
branches: [master]
jobs:
publish-gpr:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmmirror.com
cache: pnpm
- run: echo ${{ matrix.node-version }}
- run: npm -v
- run: pnpm store path
- run: pnpm install
# - run: npx changelogithub --no-group
# continue-on-error: true
# env:
# NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
# - run: git config --global user.email "saqqdy@qq.com"
# - run: git config --global user.name "saqqdy"
- run: pnpm dist
env:
NODE_OPTIONS: --max-old-space-size=6144
- name: Gen .npmrc
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ./.npmrc
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ./packages/core/.npmrc
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ./packages/gitmars/.npmrc
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ./packages/docs/.npmrc
- run: pnpm pub --test
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- run: curl -X PUT -d "sync_upstream=true" "https://registry-direct.npmmirror.com/@gitmars/monorepo/sync"
- run: curl -X PUT -d "sync_upstream=true" "https://registry-direct.npmmirror.com/@gitmars/core/sync"
- run: curl -X PUT -d "sync_upstream=true" "https://registry-direct.npmmirror.com/gitmars/sync"
- run: curl -X PUT -d "sync_upstream=true" "https://registry-direct.npmmirror.com/@gitmars/docs/sync"