Skip to content

Commit 89f6f48

Browse files
+ switch release script
1 parent e40beee commit 89f6f48

File tree

1 file changed

+40
-31
lines changed

1 file changed

+40
-31
lines changed

.github/workflows/release.yml

Lines changed: 40 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ name: Upload Python Package
33

44
on:
55
workflow_dispatch:
6-
release:
7-
types: [ published ]
6+
push:
7+
tags:
8+
- v*.*.*
89

910

1011
permissions:
@@ -16,39 +17,47 @@ jobs:
1617
name: Upload release to PyPI
1718
runs-on: ubuntu-latest
1819

19-
# Specifying a GitHub environment is optional, but strongly encouraged
20-
environment: release
21-
permissions:
22-
# IMPORTANT: this permission is mandatory for trusted publishing
23-
id-token: write
24-
2520
steps:
26-
- name: Checkout
27-
uses: actions/checkout@v4
28-
29-
- name: Setup Python
30-
uses: actions/setup-python@v4
21+
- uses: actions/checkout@v3
22+
- name: Build and publish
23+
uses: JRubics/poetry-publish@v1.17
3124
with:
32-
python-version: "3.x"
25+
pypi_token: ${{ secrets.PYPI_TOKEN }}
3326

34-
- name: Build distribution
35-
uses: |
36-
python3 -m pip install -U pip
37-
python3 -m pip install -U build --user
38-
python3 -m build
3927

40-
- name: Store the distribution packages
41-
uses: actions/upload-artifact@v3
42-
with:
43-
name: python-package-distributions
44-
path: dist/
28+
# # Specifying a GitHub environment is optional, but strongly encouraged
29+
# environment: release
30+
# permissions:
31+
# # IMPORTANT: this permission is mandatory for trusted publishing
32+
# id-token: write
4533

34+
# steps:
35+
# - name: Checkout
36+
# uses: actions/checkout@v4
4637

47-
- name: Download distribution packages
48-
uses: actions/download-artifact@v3
49-
with:
50-
name: python-package-distributions
51-
path: dist/
38+
# - name: Setup Python
39+
# uses: actions/setup-python@v4
40+
# with:
41+
# python-version: "3.x"
42+
43+
# - name: Build distribution
44+
# uses: |
45+
# python3 -m pip install -U pip
46+
# python3 -m pip install -U build --user
47+
# python3 -m build
48+
49+
# - name: Store the distribution packages
50+
# uses: actions/upload-artifact@v3
51+
# with:
52+
# name: python-package-distributions
53+
# path: dist/
54+
55+
56+
# - name: Download distribution packages
57+
# uses: actions/download-artifact@v3
58+
# with:
59+
# name: python-package-distributions
60+
# path: dist/
5261

53-
- name: Publish package distributions to PyPI
54-
uses: pypa/gh-action-pypi-publish@release/v1
62+
# - name: Publish package distributions to PyPI
63+
# uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)