-
Notifications
You must be signed in to change notification settings - Fork 3
39 lines (39 loc) · 1.33 KB
/
pre_release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Publish to Test PyPI
on:
workflow_dispatch:
inputs:
PYTHON_VERSION:
description: "Python Version"
required: false
default: "3.12.2"
POETRY_VERSION:
description: "The version of Poetry to use"
required: false
default: "1.8.2" # Ensure this matches the latest stable version
RELEASE_TAG:
description: "The new version should be a valid PEP 440 string"
required: true
default: "0.3.0"
defaults:
run:
working-directory: ./tools
jobs:
test_pypi_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Poetry
run: pip install poetry==${{ inputs.POETRY_VERSION }}
shell: bash
- name: Set up Python ${{ inputs.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.PYTHON_VERSION }}
- name: Configure Poetry with specified Python version
run: poetry env use ${Python3_ROOT_DIR}/python
- run: poetry version ${{ inputs.RELEASE_TAG }}
- run: poetry install
- run: poetry config repositories.testpypi https://test.pypi.org/legacy/
- run: poetry config pypi-token.testpypi ${{ secrets.TEST_PYPI_TOKEN }}
- name: Publish package to Test PyPI
run: poetry publish --build -r testpypi