Skip to content

Commit 242e325

Browse files
committed
Merge remote-tracking branch 'origin/main'
# Conflicts: # pyproject.toml
2 parents b5554ad + 67eaa60 commit 242e325

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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 Package
10+
11+
on:
12+
release:
13+
types: [published]
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
deploy:
20+
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- uses: actions/checkout@v3
25+
- name: Set up Python
26+
uses: actions/setup-python@v3
27+
with:
28+
python-version: '3.x'
29+
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
30+
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
31+
- name: Install dependencies
32+
run: |
33+
python -m pip install --upgrade pip
34+
pip install poetry
35+
- name: Prepare release
36+
run: python -m poetry version patch
37+
- name: Commit & Push changes
38+
uses: actions-js/push@master
39+
with:
40+
github_token: ${{ secrets.GH_TOKEN }}
41+
- name: Set credentials
42+
run: python -m poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
43+
- name: Publish package
44+
run: python -m poetry publish --build

0 commit comments

Comments
 (0)