-
Notifications
You must be signed in to change notification settings - Fork 8
91 lines (77 loc) · 3.64 KB
/
deploy-typings.yaml
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
name: Deploy typings
on:
push:
branches:
- dev
- rc
- release
- v1-compatibility
paths:
- types
workflow_dispatch:
jobs:
deploy-typings:
name: Deploy typings
runs-on: ubuntu-20.04
steps:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Checkout repository
uses: actions/checkout@v3
- name: Check package version
id: versions
working-directory: ./types
run: |
cd shared
echo "SHARED_LOCAL=$(node -p -e "require('./package.json').version")" >> $GITHUB_OUTPUT
echo "SHARED_REMOTE=$(yarn info -s $(node -p -e "require('./package.json').name") version)" >> $GITHUB_OUTPUT
cd ../client
echo "CLIENT_LOCAL=$(node -p -e "require('./package.json').version")" >> $GITHUB_OUTPUT
echo "CLIENT_REMOTE=$(yarn info -s $(node -p -e "require('./package.json').name") version)" >> $GITHUB_OUTPUT
cd ../server
echo "SERVER_LOCAL=$(node -p -e "require('./package.json').version")" >> $GITHUB_OUTPUT
echo "SERVER_REMOTE=$(yarn info -s $(node -p -e "require('./package.json').name") version)" >> $GITHUB_OUTPUT
cd ../natives
echo "NATIVES_LOCAL=$(node -p -e "require('./package.json').version")" >> $GITHUB_OUTPUT
echo "NATIVES_REMOTE=$(yarn info -s $(node -p -e "require('./package.json').name") version)" >> $GITHUB_OUTPUT
cd ../webview
echo "WEBVIEW_LOCAL=$(node -p -e "require('./package.json').version")" >> $GITHUB_OUTPUT
echo "WEBVIEW_REMOTE=$(yarn info -s $(node -p -e "require('./package.json').name") version)" >> $GITHUB_OUTPUT
- name: Publish shared package
if: ${{ steps.versions.outputs.SHARED_LOCAL != steps.versions.outputs.SHARED_REMOTE }}
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_AUTH_TOKEN }}
package: ./types/shared/package.json
access: public
- name: Publish client package
if: ${{ steps.versions.outputs.CLIENT_LOCAL != steps.versions.outputs.CLIENT_REMOTE }}
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_AUTH_TOKEN }}
package: ./types/client/package.json
access: public
- name: Publish server package
if: ${{ steps.versions.outputs.SERVER_LOCAL != steps.versions.outputs.SERVER_REMOTE }}
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_AUTH_TOKEN }}
package: ./types/server/package.json
access: public
- name: Publish natives package
if: ${{ steps.versions.outputs.NATIVES_LOCAL != steps.versions.outputs.NATIVES_REMOTE }}
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_AUTH_TOKEN }}
package: ./types/natives/package.json
access: public
- name: Publish webview package
#if: ${{ steps.versions.outputs.WEBVIEW_LOCAL != steps.versions.outputs.WEBVIEW_REMOTE }}
if: false
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_AUTH_TOKEN }}
package: ./types/webview/package.json
access: public