forked from zeta-chain/node
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (34 loc) · 975 Bytes
/
publish-typescript.yml
File metadata and controls
39 lines (34 loc) · 975 Bytes
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
name: Publish Typescript to NPM
on:
workflow_dispatch:
workflow_call:
jobs:
publish:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- name: Install buf
run: |
curl -sSL https://github.com/bufbuild/buf/releases/download/v1.47.2/buf-Linux-x86_64 -o /usr/local/bin/buf
chmod +x /usr/local/bin/buf
- name: Generate
run: |
make typescript
- name: Set Version
working-directory: typescript
run: |
npm version from-git --no-git-tag-version
- name: Publish package on NPM 📦
run: npm publish
working-directory: typescript
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}