Skip to content

v0.5.7

v0.5.7 #48

name: Automated Release
on:
release:
types: [published]
jobs:
test-again:
name: Test with pytest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest
python -m pip install .
- name: Test with pytest
run: |
pytest
build-and-release:
runs-on: ubuntu-latest
permissions: write-all
needs: [test-again]
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install build tools
run: |
python -m pip install --upgrade pip
pip install build
- name: Build wheel
run: |
python -m build --wheel
- name: Upload wheel to artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/*.whl
# - name: Create GitHub Release
# uses: docker://antonyurchenko/git-release:v5
# # configurations
# # https://github.com/anton-yurchenko/git-release?tab=readme-ov-file#configuration
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# DRAFT_RELEASE: "false"
# PRE_RELEASE: "false"
# CHANGELOG_FILE: "CHANGELOG.md"
# with:
# args: |
# dist/*.whl
publish:
runs-on: ubuntu-latest
needs: [test-again]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install twine and build
run: python -m pip install --upgrade twine build
- name: Build
run: python -m build
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}