Skip to content

Commit f4076da

Browse files
authored
Update pypi (#105)
* Update pypi publishing * Bump version
1 parent 2d99469 commit f4076da

2 files changed

Lines changed: 43 additions & 17 deletions

File tree

‎.github/workflows/pypi.yaml‎

Lines changed: 42 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
name: Upload to PyPI
1+
name: Publish
22

33
on:
44
release:
55
types: [published]
66

7+
permissions:
8+
contents: read
9+
710
jobs:
8-
upload:
11+
build:
912
runs-on: ubuntu-latest
1013

1114
steps:
@@ -14,27 +17,50 @@ jobs:
1417
with:
1518
fetch-depth: 0
1619
fetch-tags: true
20+
persist-credentials: false
1721

1822
- uses: actions/setup-python@v7
1923
with:
2024
python-version: "3.12"
2125

22-
- name: Install build dependencies
23-
run: |
24-
python -m pip install --upgrade pip
25-
pip install build twine
26+
- name: Install dependencies
27+
run: python -m pip install build
2628

27-
- name: Build package
29+
- name: Build distribution
2830
run: python -m build
2931

30-
- name: Publish to PyPI Test
31-
env:
32-
TWINE_USERNAME: __token__
33-
TWINE_PASSWORD: ${{ secrets.PYPI_TEST_TOKEN }}
34-
run: twine upload --verbose --repository testpypi dist/*
32+
- uses: actions/upload-artifact@v5
33+
with:
34+
name: dist
35+
path: dist/
36+
if-no-files-found: error
37+
38+
testpypi:
39+
needs: build
40+
runs-on: ubuntu-latest
41+
environment: testpypi
42+
permissions:
43+
id-token: write
44+
steps:
45+
- uses: actions/download-artifact@v6
46+
with:
47+
name: dist
48+
path: dist/
49+
- name: Publish to TestPyPI
50+
uses: pypa/gh-action-pypi-publish@release/v1
51+
with:
52+
repository-url: https://test.pypi.org/legacy/
3553

54+
pypi:
55+
needs: testpypi
56+
runs-on: ubuntu-latest
57+
environment: pypi
58+
permissions:
59+
id-token: write
60+
steps:
61+
- uses: actions/download-artifact@v6
62+
with:
63+
name: dist
64+
path: dist/
3665
- name: Publish to PyPI
37-
env:
38-
TWINE_USERNAME: __token__
39-
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
40-
run: twine upload --verbose --repository pypi dist/*
66+
uses: pypa/gh-action-pypi-publish@release/v1

‎arangoasync/version.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.2.5"
1+
__version__ = "1.2.6"

0 commit comments

Comments
 (0)