2022-01-26 10:51:10 +01:00
|
|
|
name: Release on PyPI
|
|
|
|
|
2021-09-09 16:06:03 +02:00
|
|
|
on:
|
|
|
|
# Add a "Trigger" button to manually start the workflow.
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
branch:
|
|
|
|
description: "The branch, tag or SHA to release from"
|
|
|
|
required: true
|
|
|
|
default: "master"
|
|
|
|
# It could be fully automated by uncommenting following lines.
|
|
|
|
# Let's see later if we are confident enough to try it :)
|
|
|
|
# release:
|
|
|
|
# types:
|
|
|
|
# - published
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
new-release:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-03-03 17:16:56 +01:00
|
|
|
- uses: actions/checkout@v3
|
2021-10-08 11:24:24 +02:00
|
|
|
with:
|
|
|
|
ref: ${{ github.event.inputs.branch }}
|
2022-01-26 10:51:10 +01:00
|
|
|
- name: PyPI configuration
|
2021-10-14 10:45:31 +02:00
|
|
|
run: |
|
2021-10-14 10:56:13 +02:00
|
|
|
echo "[distutils]\nindex-servers=\n httpie\n\n[httpie]\nrepository = https://upload.pypi.org/legacy/\n" > $HOME/.pypirc
|
2022-03-01 15:17:41 +01:00
|
|
|
- uses: actions/setup-python@v3
|
2021-09-09 16:06:03 +02:00
|
|
|
with:
|
|
|
|
python-version: 3.9
|
|
|
|
- run: make publish
|
|
|
|
env:
|
|
|
|
TWINE_USERNAME: __token__
|
|
|
|
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|