-
-
Notifications
You must be signed in to change notification settings - Fork 5
55 lines (45 loc) · 1.44 KB
/
publish-packages.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
name: Publish Packages on Version Change
on:
workflow_dispatch:
push:
branches:
- master
env:
# Required for the `old-site` app to build
GH_USERNAME: ${{ secrets.GH_USERNAME }}
GH_PAT: ${{ secrets.GH_PAT }}
PUBLIC_URL: ${{ secrets.PUBLIC_URL }}
# Required for the `website` package to build
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v1
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install Rush
run: pnpm install -g @microsoft/rush
- name: Install dependencies
run: rush install
- name: Build packages
run: NODE_ENV=production rush build
- name: Publish to npmjs Package Registry
run: |
rush publish --publish --include-all --registry https://registry.npmjs.org/
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: Publish to GitHub Package Registry
run: |
rush publish --publish --include-all --registry https://npm.pkg.github.com/
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_AUTH_TOKEN }}
GH_AUTH_TOKEN: ${{ secrets.GH_AUTH_TOKEN }}