Skip to content

Commit

Permalink
setup pypi release
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco Calcavecchia committed May 3, 2023
1 parent 9e30de6 commit 5ac3d73
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
strategy:
matrix:
os: ["ubuntu-latest"]
version: ["3.9", "3.10", "3.11"]
version: ["3.11"]
steps:
- name: Checkout 🔖
uses: actions/checkout@v3
Expand All @@ -66,7 +66,12 @@ jobs:
pypi-release:
needs: [test, check-style]
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
environment:
name: release
url: https://pypi.org/p/watch-bot
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- name: Checkout 🔖
Expand All @@ -77,16 +82,14 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Prepare release 🙆‍♂️📦test
- name: Prepare release 🙆‍♂️📦
run: |
python -m venv venv || . venv/bin/activate
pip install -U pip wheel setuptools build twine
- name: Build 🛠️📦
run: |
python -m build
ls
ls dist/
- name: Release 📦🚀
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: |
python -m twine upload dist/*
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 5ac3d73

Please sign in to comment.