Skip to content

Commit afb4e14

Browse files
authored
ci(workflows): bump actions, setup trusted publish on pypi & add py3.15 on experimental (#3)
- Update github actions - Change publish action to support OIDC trusted publish on pypi - Add py3.15 on expirimental (and pass py3.14 on supported env)
1 parent 56bcc00 commit afb4e14

File tree

4 files changed

+44
-42
lines changed

4 files changed

+44
-42
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,39 +16,38 @@ jobs:
1616
name: Build docs
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v4
20-
with:
21-
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
19+
- uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
2222

23-
- uses: actions/setup-python@v5
24-
with:
25-
python-version: '3.13'
23+
- uses: actions/setup-python@v5
24+
with:
25+
python-version: "3.14"
2626

27-
- name: Install dependencies
28-
run: pip install -r requirements.txt
27+
- name: Install dependencies
28+
run: pip install -r requirements.txt
2929

30-
- name: Build docs
31-
run: scripts/build-docs.sh
30+
- name: Build docs
31+
run: scripts/build-docs.sh
3232

33-
- name: Upload artifacts
34-
uses: actions/upload-pages-artifact@v3
35-
with:
36-
# Upload built docs
37-
path: "./site"
33+
- name: Upload artifacts
34+
uses: actions/upload-pages-artifact@v3
35+
with:
36+
path: "./site"
3837
deploy:
3938
name: Deploy docs
4039
if: github.event_name == 'release' && github.event.action == 'created'
4140
needs: build
4241
runs-on: ubuntu-latest
4342
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
4443
permissions:
45-
pages: write # to deploy to Pages
46-
id-token: write # to verify the deployment originates from an appropriate source
44+
pages: write
45+
id-token: write
4746
# Deploy to the github-pages environment
4847
environment:
4948
name: github-pages
5049
url: ${{ steps.deployment.outputs.page_url }}
5150
steps:
52-
- uses: actions/deploy-pages@v4
53-
id: deployment
54-
name: "Deploy to GitHub Pages"
51+
- uses: actions/deploy-pages@v4
52+
id: deployment
53+
name: "Deploy to GitHub Pages"

.github/workflows/publish.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,40 @@ on:
55
release:
66
types: [created]
77
branches:
8-
- 'master'
8+
- "master"
99

1010
jobs:
1111
build:
1212
name: Build distributable files
13-
runs-on: 'ubuntu-latest'
13+
runs-on: "ubuntu-latest"
1414
steps:
15-
- name: 'Checkout source repository'
15+
- name: "Checkout source repository"
1616
uses: actions/checkout@v4
1717
with:
18-
fetch-depth: 0
18+
fetch-depth: 0
1919

2020
- uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.14"
2123

2224
- name: Install build dependencies
2325
run: pip install build twine
2426

25-
- name: 'Build package'
27+
- name: "Build package"
2628
run: scripts/build.sh
2729

2830
- name: Upload build artifacts
2931
uses: actions/upload-artifact@v4
3032
with:
31-
path: 'dist/*'
33+
path: "dist/*"
3234

3335
upload_pypi:
3436
name: Upload packages
35-
needs: ['build']
36-
runs-on: 'ubuntu-latest'
37+
needs: ["build"]
38+
runs-on: "ubuntu-latest"
3739
if: github.event_name == 'release' && github.event.action == 'created'
40+
permissions:
41+
id-token: write
3842
steps:
3943
- name: Download artifacts
4044
uses: actions/download-artifact@v4
@@ -44,6 +48,3 @@ jobs:
4448

4549
- name: Publish package to PyPI
4650
uses: pypa/gh-action-pypi-publish@release/v1
47-
with:
48-
user: '__token__'
49-
password: '${{ secrets.PYPI_API_TOKEN }}'

.github/workflows/tests.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,17 @@ jobs:
2626
- "3.11"
2727
- "3.12"
2828
- "3.13"
29-
experimental: [ false ]
29+
- "3.14"
30+
experimental: [false]
3031
include:
31-
- python-version: "~3.14.0-0"
32+
- python-version: "~3.15.0-0"
3233
experimental: true
3334

3435
steps:
35-
- uses: actions/checkout@v3
36+
- uses: actions/checkout@v4
3637
with:
37-
fetch-depth: 0
38-
- uses: "actions/setup-python@v4"
38+
fetch-depth: 0
39+
- uses: "actions/setup-python@v5"
3940
with:
4041
python-version: "${{ matrix.python-version }}"
4142
cache: "pip"
@@ -56,16 +57,16 @@ jobs:
5657
- name: Enforce coverage
5758
uses: codecov/codecov-action@v4
5859
with:
59-
token: ${{ secrets.CODECOV_TOKEN }}
60+
token: ${{ secrets.CODECOV_TOKEN }}
6061

61-
check: # This job does nothing and is only used for the branch protection
62+
check: # This job does nothing and is only used for the branch protection
6263
name: ✅ Ensure the required checks passing
6364
if: always()
6465
needs:
6566
- tests
6667
runs-on: ubuntu-latest
6768
steps:
68-
- name: Decide whether the needed jobs succeeded or failed
69-
uses: re-actors/alls-green@release/v1
70-
with:
71-
jobs: ${{ toJSON(needs) }}
69+
- name: Decide whether the needed jobs succeeded or failed
70+
uses: re-actors/alls-green@release/v1
71+
with:
72+
jobs: ${{ toJSON(needs) }}

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ classifiers = [
4040
"Programming Language :: Python :: 3.11",
4141
"Programming Language :: Python :: 3.12",
4242
"Programming Language :: Python :: 3.13",
43+
"Programming Language :: Python :: 3.14",
4344
"Programming Language :: Python :: Implementation :: CPython",
4445
"Programming Language :: Python :: Implementation :: PyPy",
4546
"Operating System :: POSIX",

0 commit comments

Comments
 (0)