Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e636214

Browse filesBrowse files
committed
Add test publish workflow
1 parent 314ce7d commit e636214
Copy full SHA for e636214

File tree

Expand file treeCollapse file tree

1 file changed

+47
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+47
-0
lines changed
+47Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Based on: https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
2+
3+
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
4+
5+
on: workflow_dispatch
6+
7+
jobs:
8+
build-n-publish:
9+
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Set up Python
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: "3.8"
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip pytest cmake scikit-build setuptools
21+
- name: Build source distribution
22+
run: |
23+
python setup.py sdist
24+
# - name: Install pypa/build
25+
# run: >-
26+
# python -m
27+
# pip install
28+
# build
29+
# --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/
43+
# - name: Publish distribution 📦 to PyPI
44+
# if: startsWith(github.ref, 'refs/tags')
45+
# uses: pypa/gh-action-pypi-publish@release/v1
46+
# with:
47+
# password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.