Merge pull request #80 from InstituteforDiseaseModeling/ben_20231016 #5
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
# This workflows will upload a Python Package using Twine when a release is created | |
name: "Staging: snt" | |
on: | |
push: | |
branches: | |
# only run this on | |
- main | |
paths: | |
- 'snt/**' | |
- 'requirements.txt' | |
- 'setup.py' | |
jobs: | |
deploy-snt-staging: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools wheel twine bump2version | |
git config --global user.name "IDM Tools" | |
git config --global user.email "[email protected]" | |
- uses: actions/checkout@v2 | |
- name: Build and publish | |
env: | |
TWINE_REPOSITORY_URL: https://packages.idmod.org/api/pypi/idm-pypi-staging/ | |
TWINE_USERNAME: ${{ secrets.PYPI_STAGING_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_STAGING_PASSWORD }} | |
run: | | |
python setup.py sdist bdist_wheel | |
twine upload dist/* |