Skip to content

Commit

Permalink
Merge branch 'master' of github.com:cnpem-sei/pydrs
Browse files Browse the repository at this point in the history
  • Loading branch information
gfrn committed Jul 28, 2022
2 parents f262245 + 08cf26c commit 6a8dbdb
Showing 1 changed file with 18 additions and 22 deletions.
40 changes: 18 additions & 22 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,28 @@
name: Publish to PyPI
name: Publish to PyPi

on:
release:
types: [created]

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.x"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install -r requirements.txt
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
sed -i -e "s/__version__ =.*/__version__ = \"$(git describe --tags)\"/" src/pydrs/info.py
sed -i -e "s/__date__ =.*/__date__ = \"$(date -R)\"/" src/pydrs/info.py
cat src/pydrs/__init__.py | grep 'version\|author'
python setup.py sdist bdist_wheel
twine upload dist/*
cd ..
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python -m build .
twine upload dist/*

0 comments on commit 6a8dbdb

Please sign in to comment.