Skip to content

Bump version for release #18

Bump version for release

Bump version for release #18

name: Publish Test PyPI Release
on:
workflow_dispatch:
inputs:
devNumber:
required: false
type: number
description: 'The number to use as a ".devN" suffix. Defaults to 1.'
push:
tags: ["*"]
jobs:
build-dists:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- run: python -m pip install build twine
- name: Set dev version prior to upload (auto)
if: ${{ github.event.inputs.devNumber == '' }}
run: python ./scripts/set-dev-version.py
- name: Set dev version prior to upload (workflow_dispatch)
if: ${{ github.event.inputs.devNumber != '' }}
run: python ./scripts/set-dev-version.py -n ${{ github.event.inputs.devNumber }}
- name: Build Dists
run: python -m build .
- name: Check Dists (twine)
run: twine check dist/*
- uses: actions/upload-artifact@v3
with:
name: packages
path: dist/*
publish:
needs: [build-dists]
runs-on: ubuntu-latest
environment: publish-testpypi
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v3
with:
name: packages
path: dist
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/