-
Notifications
You must be signed in to change notification settings - Fork 4
45 lines (43 loc) · 1.17 KB
/
build-and-publish.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
name: Build and publish python package
on:
push:
tags:
- "v*"
jobs:
# build-and-publish-py-package:
# runs-on: ubuntu-latest
# defaults:
# run:
# working-directory: ./client
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-python@v4
# with:
# python-version: "3.8"
# - name: Build wheel
# run: pip install build && python -m build
# - name: Publish to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# password: ${{ secrets.PYPI_API_TOKEN }}
# packages-dir: ./client/dist
build-and-publish-ts-package:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./ts-client
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: "16"
- name: Set version from the gittag
run: npm version ${{ github.ref_name }}
- name: Install dependencies
run: npm install
- name: Build package
run: npm run build
- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_API_TOKEN }}