-
Notifications
You must be signed in to change notification settings - Fork 7
59 lines (56 loc) · 1.93 KB
/
npm-publish.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
name: Publish all Wallet Connect Libs (Core, React, Wallet-Core and Wallet-react)
on: workflow_dispatch
env:
NODE_VERSION: 16.x
jobs:
publish:
runs-on: ubuntu-latest
environment: release
permissions:
contents: write
pages: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Setup Node Version ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Config Git Properties
run: |
git config --global user.email github-actions@github.com
git config --global user.name github-actions
- name: Install RushJS
run: npm install -g @microsoft/rush
- name: Verify Change Logs
run: rush change --verify
- name: Update package.json version(s)
run: rush version --bump
- name: Install dependencies
run: rush update
- name: Build Projects
run: rush rebuild
- name: Publish Projects
run: rush publish --apply --target-branch main --publish --npm-auth-token ${{ secrets.NPM_TOKEN }} --add-commit-details --include-all
- name: Merge Docs
run: rush docs
- name: Publish Docs
uses: actions/upload-pages-artifact@v2
with:
path: './docs'
- name: Deploy GitHub Pages
uses: actions/deploy-pages@v2
# Adding all modified files to ensure 'rush change --verify' correctly identifies changes.
# This is because the command only recognizes changes in files that were added in the commit.
- name: Rush Change
run: |
git add .
rush change --message "Update package.json version(s)" --bump-type none --bulk
- name: Commit and Push package.json version update
run: |
git add .
git commit -m "Update package.json version(s)"
git push