-
Notifications
You must be signed in to change notification settings - Fork 122
34 lines (29 loc) · 1014 Bytes
/
pypi.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
name: Python package and publish
on:
release:
types: [published]
jobs:
pypi-publish:
name: Package and upload release to PyPI
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install building dependencies
run: pip -q install build
- name: Build package
run: python -m build --outdir dist/ .
- name: Install package
run: pip -q install dist/pyangbind-*.whl
- name: Test bind with pyang
run: |
export PYBINDPLUGIN=`/usr/bin/env python -c 'import pyangbind; import os; print ("{}/plugin".format(os.path.dirname(pyangbind.__file__)))'`
pyang -V --plugindir $PYBINDPLUGIN -f pybind tests/base-test.yang
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1