Merge pull request #9 from fga-eps-mds/US010 #24
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: Publicar pacote | |
on: | |
push: | |
branches: [ develop ] | |
tags: | |
- "v*" | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Instalar dependências | |
run: | | |
python -m pip install --upgrade pip | |
pip install build | |
pip install twine | |
- name: Build package | |
run: python -m build | |
- name: Publish package on test pypi | |
if: github.ref == 'refs/heads/develop' | |
run: python -m twine upload -u __token__ -p ${{ secrets.TEST_PYPI_API_TOKEN }} --repository testpypi dist/* | |
- name: Publish package on pypi | |
#if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
run: python -m twine upload -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} dist/* |