diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..4b54dce --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,31 @@ +name: Upload Python Package + +on: + release: + types: [published] + +jobs: + deploy: + runs-on: ubuntu-latest + + permissions: + id-token: write + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + + - name: Build package + run: python -m build + + - name: Publish package + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/DEVELOPER.md b/DEVELOPER.md index 25a3fbb..7ba9473 100644 --- a/DEVELOPER.md +++ b/DEVELOPER.md @@ -32,15 +32,3 @@ An item type may have: After creating a new item type, Add a line in the mapping table in `README.md`, and add a subsection in the same section of the `README.md`. - -## Publishing a release - -These notes are here just in case I forget the process, because I do those -things too rarely to remember them correctly... - -First, change version in `setup.py`, then execute: - -```plain -python3 -m build -python3 -m twine upload dist/* -```