Skip to content

Commit 6020fcc

Browse files
authored
Publish Python 🐍 distributions 📦 to TestPyPI
1 parent fa51839 commit 6020fcc

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# This workflow will upload a Python Package using Twine when a release is created
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Upload Python 🐍 distributions 📦 to TestPyPI
10+
11+
on: push
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
build-n-publish:
18+
name: Build and publish Python 🐍 distributions 📦 to TestPyPI
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v3
22+
- name: Set up Python
23+
uses: actions/setup-python@v4
24+
with:
25+
python-version: '3.x'
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install build --user
30+
- name: Build a binary wheel and a source tarball
31+
run: >-
32+
python -m
33+
build
34+
--sdist
35+
--wheel
36+
--outdir dist/
37+
.
38+
- name: Publish distribution 📦 to Test PyPI
39+
uses: pypa/gh-action-pypi-publish@release/v1
40+
with:
41+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
42+
repository-url: https://test.pypi.org/legacy/

0 commit comments

Comments
 (0)