-
Notifications
You must be signed in to change notification settings - Fork 2
87 lines (75 loc) · 2.46 KB
/
update-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
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
name: Update packages
on:
repository_dispatch:
types: [new-release]
jobs:
update:
name: Update package
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: "18.x"
- name: Enable corepack
run: corepack enable
- name: Update package for each subdirectory
run: |
for dir in $(find . -mindepth 3 -maxdepth 3 -type d ! -path "./.git*"); do
cd "$dir"
echo "Updating package for $dir"
npx npm-check-updates -u @superviz/sdk
npx npm-check-updates -u @superviz/react-sdk
npx npm-check-updates -u @superviz/matterport-plugin
npx npm-check-updates -u @superviz/autodesk-viewer-plugin
npx npm-check-updates -u @superviz/threejs-plugin
yarn install
git add .
cd -
done
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Update package
dispatch:
name: Repository Dispatch
runs-on: ubuntu-latest
steps:
- name: Update doc-samples
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.SUPERVIZ_DEV_TOKEN }}
repository: SuperViz/docs-samples
event-type: new-release
client-payload: '{"version": "v0.0.0"}'
- name: Update demos
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.SUPERVIZ_DEV_TOKEN }}
repository: SuperViz/demos
event-type: new-release
client-payload: '{"version": "v0.0.0"}'
- name: Update doc-demos
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.SUPERVIZ_DEV_TOKEN }}
repository: SuperViz/docs-demos
event-type: new-release
client-payload: '{"version": "v0.0.0"}'
slackNotificationProduction:
needs:
- dispatch
name: Slack Notification
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_ICON: https://avatars.slack-edge.com/2020-11-18/1496892993975_af721d1c045bea2d5a46_48.png
MSG_MINIMAL: true
SLACK_USERNAME: Samples update