Skip to content

Commit

Permalink
Update pypi publish
Browse files Browse the repository at this point in the history
  • Loading branch information
Tinitto committed Feb 10, 2024
1 parent 9b689f2 commit 0f9d181
Showing 1 changed file with 29 additions and 7 deletions.
36 changes: 29 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ jobs:
run: |
cd $GITHUB_WORKSPACE
pytest
release:
docs:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
Expand All @@ -58,12 +59,33 @@ jobs:
python -m pip install --upgrade pip
python --version
pip install -r requirements.txt
- name: Build
run: |
python -m build
- name: Deploy docs
run: mkdocs gh-deploy --force

release:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: docs
environment: release
permissions:
id-token: write
steps:
- name: Checkout the commit
uses: actions/checkout@v3

- name: Set up Python 3.8
uses: actions/setup-python@v3
with:
python-version: "3.8"

- name: Install dependencies
run: |
mkdocs gh-deploy --force
cd $GITHUB_WORKSPACE
python -m pip install --upgrade pip
python --version
pip install -r requirements.txt
- name: Build
run: python -m build
- name: Upload to pypi
run: |
twine upload -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} dist/*
run: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 0f9d181

Please sign in to comment.