Skip to content

feat: 新增类型文件 #10

feat: 新增类型文件

feat: 新增类型文件 #10

Workflow file for this run

name: Publish to NPM on Main Push
on:
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: recursive
- name: 设置 Node.js
uses: actions/setup-node@v2
with:
node-version: 20
registry-url: "https://registry.npmjs.org/"
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: 全局安装 typescript
run: npm install -g typescript
- name: 编译index.ts
run: tsc
- name: 全局安装 protobufjs-cli
run: npm install -g protobufjs-cli
- name: 编译 proto
run: npm run build
- name: 推送到 npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}