Skip to content

Commit d8fa812

Browse files
authored
ci: switch to trusted publishing (#992)
Switch to PYPI Trusted Publishing (OICD).
1 parent 36a2911 commit d8fa812

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

.github/workflows/publish.yml

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,29 @@ on:
99
jobs:
1010
publish:
1111
if: github.repository == 'pytest-dev/pytest-html'
12-
runs-on: ubuntu-latest
12+
runs-on: ubuntu-24.04
13+
permissions:
14+
id-token: write
1315
steps:
14-
- uses: actions/checkout@v6
15-
with:
16-
fetch-depth: 0
17-
persist-credentials: false
16+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
17+
with:
18+
fetch-depth: 0
19+
persist-credentials: false
1820

19-
- name: Use Node.js
20-
uses: actions/setup-node@v6
21-
with:
22-
node-version: '24.x'
21+
- name: Use Node.js
22+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
23+
with:
24+
node-version: "24.x"
25+
cache: "npm"
2326

24-
- name: Build and Check Package
25-
uses: hynek/build-and-inspect-python-package@v2
27+
- name: Build and Check Package
28+
uses: hynek/build-and-inspect-python-package@efb823f52190ad02594531168b7a2d5790e66516 # v2.14.0
2629

27-
- name: Download Package
28-
uses: actions/download-artifact@v7
29-
with:
30-
name: Packages
31-
path: dist
30+
- name: Download Package
31+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
32+
with:
33+
name: Packages
34+
path: dist
3235

33-
- name: Publish package to PyPI
34-
uses: pypa/gh-action-pypi-publish@release/v1
35-
with:
36-
password: ${{ secrets.pypi_password }}
36+
- name: Publish package to PyPI
37+
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0

0 commit comments

Comments
 (0)