-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (47 loc) · 1.27 KB
/
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
46
47
48
49
50
name: Publish Python Package
on:
push:
branches:
- main
jobs:
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: release
url: https://pypi.org/p/dbt-command-center
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
packages: write
contents: write
deployments: write
steps:
# retrieve your distributions here
- uses: actions/checkout@v4.1.6
- name: Setup Node.js environment
uses: actions/setup-node@v4.0.2
with:
node-version: 18
registry-url: https://npm.pkg.github.com/
- name: Install npm dependencies
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
cd web
npm ci
cd ..
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install Python dependencies
run: |
pip install -r requirements.txt
- name: Build package
run: |
rm -rf dist
cd web
npm run build
cd ..
python setup.py sdist bdist_wheel
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1