-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (44 loc) · 1.65 KB
/
nodejs.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
name: Generate Node.js SDK
# 手动生成各语言 SDK 产物
# 生成完成后,在各 SDK Repo 中手动执行拉取、测试、发布
on:
workflow_dispatch:
# push:
# branches:
# - main
jobs:
Typescript:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install node_modules
run: yarn && yarn build
- name: Build Package
run: yarn generate:node
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.API_TOKEN_GITHUB }}
publish_dir: ./generated/typescript
publish_branch: temp/node
# - name: Pushes to another repository
# uses: cpina/github-action-push-to-another-repository@main
# env:
# API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
# with:
# source-directory: 'generated/typescript'
# destination-github-username: 'authing'
# destination-repository-name: 'authing-node-sdk'
# user-email: willin@willin.org
# target-branch: main