Skip to content

Commit

Permalink
Merge branch 'master' into DamID
Browse files Browse the repository at this point in the history
  • Loading branch information
BuysDB authored Oct 14, 2024
2 parents 0abdbaa + 951a106 commit 9be66f5
Showing 1 changed file with 33 additions and 12 deletions.
45 changes: 33 additions & 12 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,47 @@
name: Upload Python Package
name: Publish Python Package

on:
release:
types: [created]

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install '.[test]'
- name: Run tests
run: |
pytest
deploy:
runs-on: ubuntu-latest
needs: [test]
environment: release
permissions:
id-token: write
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
pip install setuptools wheel build
- name: Build
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
python -m build
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 9be66f5

Please sign in to comment.