Skip to content

ci: bump 'checkout' and 'setup-python' to latest versions #9

ci: bump 'checkout' and 'setup-python' to latest versions

ci: bump 'checkout' and 'setup-python' to latest versions #9

Workflow file for this run

on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
name: Test Python ${{ matrix.python }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install pytest -e .
- name: Run tests
run: py.test -v translationstring
release:
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
runs-on: ubuntu-latest
name: Release
needs: [ test ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install wheel
run: python -m pip install wheel --user
- name: Insert version number
run: |
version=$(echo $GITHUB_REF | cut -d/ -f3)
sed -ie "/version/s/=.*/='$version',/" setup.py
- name: Build a binary wheel and a source tarball
run: python setup.py sdist bdist_wheel
- name: Publish package
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}
- name: Create GitHub Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false