-
Notifications
You must be signed in to change notification settings - Fork 5
38 lines (35 loc) · 1.04 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
name: Build and Publish Release to PYPI
on:
push:
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0 # Necessary to get tags
- uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install Jupyter Lab
run: |
pip install -U jupyterlab~=3.6
- name: Get Release Version
uses: mtkennerly/dunamai-action@v1
with:
env-var: NBD_JLE_VERSION
args: --style semver --format "{base}"
- name: Set Version
run: |
echo "__version__ = '$NBD_JLE_VERSION'" > nbdefense_jupyter/_version.py
jlpm version --new-version $NBD_JLE_VERSION --no-git-tag-version --no-commit-hooks
- name: Package the extension
run: |
make build-prod
- name: Publish the Extension
run: |
pip install hatch==1.6.3
hatch publish --user __token__ --auth ${{ secrets.NBDEFENSE_JLE_PYPI_API_TOKEN }}