Skip to content

Commit ad4b6a0

Browse files
committed
Fix CI status links in README for new CI workflow.
1 parent c3386cf commit ad4b6a0

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

.github/workflows/ci.yaml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
1-
name: CI workflow for python projects
1+
name: CI workflow
22

33
# Run the CI test workflow of jobs which includes:
44
# - `test`: Run tests (including code checks) using `tox`.
55
# - `build`: Build the python package.
66
# - `publish-test`: Publish the package to test.pypi.org.
77
# - `publish`: Publish the package to pypi.org (runs `publish-test`).
88
# - `release`: Create a GitHub release.
9+
#
10+
# Requirements for trusted publishing of python packages to pypi.org:
11+
# 1. For trusted publishing, the publishing workflow must be in the project
12+
# repository, so copy this workflow file to `.github/workflows/ci.yaml`
13+
# in your repository.
14+
# 2. Create a github Environment in your repo called `publish-pypi`
15+
# (Settings->Environments->New Environment) (Optional).
16+
# 3. Add the name of this workflow file (ci.yaml) as a "trusted
17+
# publisher" on your pypi and test.pypi project pages (add the name of the
18+
# relevant Environment for additional access control).
19+
# 4. Call this workflow from a parent workflow with the `pypi` input set to
20+
# "upload.pypi" or "test.pypi" (default).
21+
922

1023
# Configure the workflows here. Each environment variable name should be a
1124
# wildcard matching the
@@ -27,7 +40,7 @@ env:
2740
jobs=["test", "build"]
2841
python-version=["3.9", "3.13"]
2942
os=["ubuntu-latest"]
30-
on-workflow_dispatch-*: | # Manual trigger of the workflow
43+
on-workflow_dispatch-branch-*: | # Manual trigger of the workflow
3144
jobs=["test", "build"]
3245
python-version=["3.9", "3.13"]
3346
os=["ubuntu-latest"]
@@ -36,6 +49,9 @@ on:
3649
push:
3750
branches: ["**"] # Push commits to any branch
3851
tags: ["v[0-9]*"] # Publish on tags matching "v*", eg. "v1.0.0"
52+
53+
####### Edit above this line - leave the rest of the workflow intact.
54+
3955
workflow_dispatch: # Allow manual triggering of the workflow
4056

4157
jobs:

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,8 @@
77
https://img.shields.io/pypi/pyversions/mpremote-path.svg)](
88
https://pypi.python.org/pypi/mpremote-path/)
99
[![GitHub Actions (Tests)](
10-
https://github.com/glenn20/mpremote-path/actions/workflows/ci-test-build.yaml/badge.svg)](
11-
https://github.com/glenn20/mpremote-path/actions/workflows/ci-test-build.yaml)
12-
[![GitHub Actions (Publish)](
13-
https://github.com/glenn20/mpremote-path/actions/workflows/ci-release.yaml/badge.svg)](
14-
https://github.com/glenn20/mpremote-path/actions/workflows/ci-release.yaml)
10+
https://github.com/glenn20/mpremote-path/actions/workflows/ci.yaml/badge.svg)](
11+
https://github.com/glenn20/mpremote-path/actions/workflows/ci.yaml)
1512
[![PyPI - License](
1613
https://img.shields.io/pypi/l/mpremote-path)](
1714
https://opensource.org/licenses/MIT)

0 commit comments

Comments
 (0)