-
Notifications
You must be signed in to change notification settings - Fork 8
33 lines (31 loc) · 926 Bytes
/
pypi-test.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
name: PYPI-TEST-PUBLISH
on:
workflow_dispatch:
inputs:
TESTPYPI_VESION:
description: 'TestPyPI Version'
required: true
jobs:
publish:
name: Publish to Test PyPi
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Set up Python 3.7
uses: actions/setup-python@v5
with:
python-version: 3.7
- name: Replace version
run:
sed -rie "s/__version__ = \"(.*)\"/__version__ = \"\1.${{ inputs.TESTPYPI_VESION }}\""/g linkify_it/__init__.py
- name: Build package
run: |
pip install build
python -m build
- name: Publish package distributions to TestPyPI
uses: pypa/gh-action-pypi-publish@v1.12.2
with:
repository-url: https://test.pypi.org/legacy/
user: __token__
password: ${{ secrets.TEST_PYPI_KEY }}