forked from fga-eps-mds/MeasureSoftGram-Parser
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (29 loc) · 950 Bytes
/
python-publish.yml
File metadata and controls
38 lines (29 loc) · 950 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Publicar pacote
on:
push:
branches: [ main, 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/*