Skip to content

Merge pull request #112 from smkent/manage-cookie #23

Merge pull request #112 from smkent/manage-cookie

Merge pull request #112 from smkent/manage-cookie #23

Workflow file for this run

---
name: Release
env:
ENABLE_PYPI_PUBLISH: true
ENABLE_TEST_PYPI_PUBLISH: true
RELEASE_PYTHON_VERSION: "3.12"
RELEASE_POETRY_VERSION: "1.6"
on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
Publish:
name: Publish package for ${{ github.ref_name }}
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- name: 💾 Check out repository
uses: actions/checkout@v3
- name: 🐍 Set up Python project with Poetry
uses: ./.github/workflows/actions/python-poetry
with:
python_version: ${{ env.RELEASE_PYTHON_VERSION }}
poetry_version: ${{ env.RELEASE_POETRY_VERSION }}
- name: 🔥 Test
run: poetry run poe test
- name: 🚒 Create test summary
uses: test-summary/action@v1
if: success() || failure()
with:
paths: ./.pytest_results.xml
- name: 📦 Build package
if: |
env.ENABLE_PYPI_PUBLISH == 'true'
|| env.ENABLE_TEST_PYPI_PUBLISH == 'true'
run: poetry build
- name: 🔼 Publish to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: ${{ env.ENABLE_TEST_PYPI_PUBLISH == 'true' }}
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true
- name: ☢️ Publish to PyPI
if: ${{ env.ENABLE_PYPI_PUBLISH == 'true' }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false