-
Notifications
You must be signed in to change notification settings - Fork 458
108 lines (108 loc) · 3.24 KB
/
rmw-shell.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: rmw-shell
on:
push:
branches:
- master
paths:
- "packages/rmw-shell/src/**"
- "packages/rmw-shell/cra-template-rmw/template/**"
workflow_dispatch:
jobs:
rmw-shell:
runs-on: ubuntu-latest
environment: prod
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "16"
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: npm i
working-directory: ./packages/rmw-shell
- name: Install release-it
run: npm i -g release-it
working-directory: ./packages/rmw-shell
- name: git config
run: |
npm config set legacy-peer-deps true
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: git pull
run: |
git diff
git add .
git commit -m "Update rmw-shell"
git pull
- name: Publish
run: npm run release
working-directory: ./packages/rmw-shell
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
rmw-shell-template:
if: ${{ always() }}
needs: [rmw-shell]
runs-on: ubuntu-latest
environment: prod
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "16"
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: npm i
working-directory: ./packages/rmw-shell/cra-template-rmw
- name: Install release-it
run: npm i -g release-it
working-directory: ./packages/rmw-shell/cra-template-rmw
- name: git config
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: git pull
run: |
git add .
git commit -m "Update rmw-shell-template"
git diff
git pull
- name: Publish
run: npm run release
working-directory: ./packages/rmw-shell/cra-template-rmw
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
rmw-shell-demo:
if: ${{ always() }}
needs: [rmw-shell-template]
runs-on: ubuntu-latest
environment: prod
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "16"
- name: git config
run: |
npm config set legacy-peer-deps true
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: install-rmw-shell
run: npx create-react-app demo-app --template rmw --use-npm
- name: install firebase functins dependencies
run: npm i
working-directory: ./demo-app/firebase/functions
- name: run build
run: |
npm run build
env:
CI: false
working-directory: ./demo-app
- name: Install firebase tools
run: npm i -g firebase-tools
- name: Deploy
run: |
firebase use prod
firebase deploy --only hosting --token $FIREBASE_TOKEN
working-directory: ./demo-app
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}