Skip to content

Commit 3f46d16

Browse files
authored
More fixes for release pipeline (#181)
1 parent 9958749 commit 3f46d16

File tree

1 file changed

+24
-30
lines changed

1 file changed

+24
-30
lines changed

.github/workflows/release.yml

Lines changed: 24 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,46 +3,40 @@ name: release
33
on:
44
release:
55
types: [published]
6+
workflow_dispatch:
67

78
jobs:
89
pypi:
910
name: Publish to PyPI registry
1011
environment: release
1112
runs-on: ubuntu-24.04
13+
permissions:
14+
id-token: write
1215

1316
env:
1417
FORCE_COLOR: 1
1518
PY_COLORS: 1
1619
TOXENV: packaging
17-
TOX_PARALLEL_NO_SPINNER: 1
1820

1921
steps:
20-
- name: Switch to using Python 3.10 by default
21-
uses: actions/setup-python@v5
22-
with:
23-
python-version: "3.10"
24-
- name: Install tox
25-
run: >-
26-
python3 -m
27-
pip install
28-
--user
29-
tox
30-
- name: Check out src from Git
31-
uses: actions/checkout@v4
32-
with:
33-
fetch-depth: 0 # needed by setuptools-scm
34-
- name: Build dists
35-
run: python -m tox
36-
- name: Publish to test.pypi.org
37-
if: >- # "create" workflows run separately from "push" & "pull_request"
38-
github.event_name == 'release'
39-
uses: pypa/[email protected]
40-
with:
41-
password: ${{ secrets.testpypi_password }}
42-
repository_url: https://test.pypi.org/legacy/
43-
- name: Publish to pypi.org
44-
if: >- # "create" workflows run separately from "push" & "pull_request"
45-
github.event_name == 'release'
46-
uses: pypa/[email protected]
47-
with:
48-
password: ${{ secrets.pypi_password }}
22+
- name: Switch to using Python 3.10 by default
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: "3.10"
26+
27+
- name: Install tox
28+
run: python3 -m pip install --user "tox>=4.0.0"
29+
30+
- name: Check out src from Git
31+
uses: actions/checkout@v4
32+
with:
33+
fetch-depth: 0 # needed by setuptools-scm
34+
submodules: true
35+
36+
- name: Build dists
37+
run: python3 -m tox
38+
39+
- name: Publish to pypi.org
40+
if: >- # "create" workflows run separately from "push" & "pull_request"
41+
github.event_name == 'release'
42+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)