Skip to content

[2.4.0] - 2025-05-16 #63

[2.4.0] - 2025-05-16

[2.4.0] - 2025-05-16 #63

Workflow file for this run

name: Publish
on:
release:
types: [created]
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
env:
TARGET_URL: https://pypi.org/project/patch-api/
steps:
- name: Check out code
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
- uses: chrnorm/deployment-action@releases/v1
name: Create GitHub deployment
id: deployment
with:
token: "${{ github.token }}"
target_url: ${{ env.TARGET_URL }}
environment: production
- name: Setup Python
uses: actions/setup-python@e9aba2c848f5ebd159c070c61ea2c4e2b122355e # v2.3.4
with:
python-version: "3.12"
- name: Run tests
env:
SANDBOX_API_KEY: ${{ secrets.SANDBOX_API_KEY }}
run: make test
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Update deployment status (success)
if: success()
uses: chrnorm/deployment-status@releases/v1
with:
token: "${{ github.token }}"
target_url: ${{ env.TARGET_URL }}
state: "success"
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
- name: Update deployment status (failure)
if: failure()
uses: chrnorm/deployment-status@releases/v1
with:
token: "${{ github.token }}"
target_url: ${{ env.TARGET_URL }}
state: "failure"
deployment_id: ${{ steps.deployment.outputs.deployment_id }}