Update README.md (#90) #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Publish Release to PYPI | |
on: | |
push: | |
tags: | |
- v* | |
jobs: | |
publish-nbdefense: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Necessary to get tags | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.8" | |
- uses: snok/install-poetry@v1 | |
with: | |
version: 1.8.0 | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
- name: Get Release Version | |
uses: mtkennerly/dunamai-action@v1 | |
with: | |
env-var: NBD_VERSION | |
args: --style semver --format "{base}" | |
- name: Set Package Version | |
run: | | |
echo "__version__ = '$NBD_VERSION'" > nbdefense/_version.py | |
poetry version $NBD_VERSION | |
- name: Build Package | |
run: | | |
poetry build | |
- name: Publish Package to PYPI | |
run: | | |
poetry config pypi-token.pypi ${{ secrets.NBDEFENSE_PYPI_API_TOKEN }} | |
poetry publish |