Skip to content

Fix Scanner Dependency Error Messages (#78) #8

Fix Scanner Dependency Error Messages (#78)

Fix Scanner Dependency Error Messages (#78) #8

Workflow file for this run

name: Build and Publish Release to PYPI
on:
push:
tags:
- v*
jobs:
publish-modelscan:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
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"
- uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Get Release Version
uses: mtkennerly/dunamai-action@v1
with:
env-var: MODELSCAN_VERSION
args: --style semver --format "{base}"
- name: Set Package Version
run: |
echo "__version__ = '$MODELSCAN_VERSION'" > modelscan/_version.py
poetry version $MODELSCAN_VERSION
- name: Build Package
run: |
poetry build
- name: Publish Package to PYPI
run: |
poetry config pypi-token.pypi ${{ secrets.MODELSCAN_PYPI_API_TOKEN }}
poetry publish