-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (42 loc) · 1.23 KB
/
protobufjs.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
name: Build ProtobufJs
on: [push, pull_request]
env:
CLICOLOR_FORCE: 1
jobs:
protobufjs:
name: protobufjs
runs-on: ubuntu-latest
steps:
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install NodeJs
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install protobufjs-cli
run: npm install -g protobufjs-cli
- name: Checkout Proto
uses: actions/checkout@v3
with:
ref: next
path: proto
- name: Checkout protobufjs
uses: actions/checkout@v3
with:
ref: out_protobufjs
path: out_protobufjs
- name: Build protobufjs
run: |
pbjs -t static-module -w commonjs -o ../out_protobufjs/lebai.js ./*.proto
pbts -o ../out_protobufjs/lebai.d.ts ../out_protobufjs/lebai.js
working-directory: proto
- name: Publish protobufjs
run: |
git config user.name github-actions
git config user.email [email protected]
git add .
(git commit -m $(date +%Y%m%d)) || true
(git push) || true
working-directory: out_protobufjs