PyTorch Zipfile Check and Tests (#87) #9
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-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 |