Skip to content

Commit

Permalink
Update release workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
gomezzz committed Nov 25, 2024
1 parent 87f2873 commit 5ca48fa
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 32 deletions.
38 changes: 17 additions & 21 deletions .github/workflows/deploy_to_pypi.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,25 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Upload Python Package to pypi
name: Upload Python Package to PyPI

on: workflow_dispatch

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: |
pip install setuptools wheel twine
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.10
- name: Install dependencies
run: |
pip install setuptools wheel twine
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Build and publish to PyPI
env:
TWINE_USERNAME: "__token__"
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
19 changes: 8 additions & 11 deletions .github/workflows/deploy_to_test_pypi.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Upload Python Package to testpypi
name: Upload Python Package to Test PyPI

on:
workflow_dispatch:
Expand All @@ -13,19 +10,19 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.10
- name: Install dependencies
run: |
pip install setuptools wheel twine
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Build and publish
- name: Build and publish to Test PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
TWINE_USERNAME: "__token__"
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
run: |
python setup.py sdist bdist_wheel
twine upload -r testpypi dist/*
twine upload -r testpypi dist/*

0 comments on commit 5ca48fa

Please sign in to comment.