Skip to content

Merge pull request #230 from minrk/redis #101

Merge pull request #230 from minrk/redis

Merge pull request #230 from minrk/redis #101

Workflow file for this run

# This is a GitHub workflow to auto-deploy releases on tags
# Useful references:
# https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
# https://docs.github.com/en/free-pro-team@latest/actions/guides/building-and-testing-python#publishing-to-package-registries
# https://github.community/t/how-to-run-github-actions-workflow-only-for-new-tags/16075
# https://www.codingwithcalvin.net/git-tag-based-released-process-using-github-actions/
name: Release
# Always build releases (to make sure wheel-building works)
# but only publish to PyPI on tags
on:
push:
tags: "[0-9]+.[0-9]+.[0-9]+*"
branches: main
jobs:
build-release:
name: Build release
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install build package
run: |
python -m pip install --upgrade pip
pip install build
pip freeze
- name: Build release
run: |
python -m build --sdist --wheel .
ls -l dist
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: startsWith(github.ref, 'refs/tags/')
with:
user: __token__
password: ${{ secrets.pypi_password }}