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 fa46b80

Browse filesBrowse files
committed
ci: added release CI (uploads to PyPi)
1 parent 62c4ac4 commit fa46b80
Copy full SHA for fa46b80

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+30
-0
lines changed

‎.github/workflows/release.yml

Copy file name to clipboard
+30Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
publish-pypi:
9+
name: Publish to PyPi
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Set up Python
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: '3.x'
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install poetry
22+
- name: Build and publish
23+
env:
24+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
25+
run: |
26+
# set pyproject.toml version to github.ref_name (without v prefix)
27+
# just in case someone forgot...
28+
VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//')
29+
sed -i 's/^version = ".*"$/version = "'"$VERSION"'"/' pyproject.toml
30+
poetry publish --build --username=__token__ --password=$PYPI_TOKEN

0 commit comments

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