Skip to content

[2.3.0] 2025-01-10

[2.3.0] 2025-01-10 #60

Workflow file for this run

name: Publish
on:
release:
types: [created]
jobs:
publish:
# 03/27/23: it looks like there are issues with the tarballs for all python 3.6 versions
# that are on ubuntu-22.04 (ubuntu-latest at the time). To maintain python compatibility
# we're pinning ubuntu-20.04 so that we can properly run install python 3.6.
#
# As soon as this issue is addressed, we should put the image back to ubuntu-latest:
# https://github.com/actions/setup-python/issues/544
name: Publish
runs-on: ubuntu-20.04
env:
TARGET_URL: https://pypi.org/project/patch-api/
steps:
- name: Check out code
uses: actions/checkout@v2
- 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@v2
with:
python-version: "3.6"
- 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 }}