File tree Expand file tree Collapse file tree 1 file changed +31
-1
lines changed Expand file tree Collapse file tree 1 file changed +31
-1
lines changed Original file line number Diff line number Diff line change 1
- name : Bump version
1
+ # Workflow for creating a new release version and publishing to PyPI
2
+ name : Bump version and publish
2
3
4
+ # This workflow is manually triggered
3
5
on :
4
6
workflow_dispatch
5
7
6
8
jobs :
9
+ # Create a new version tag based on semantic versioning
7
10
tag :
11
+ # Need write permissions to create tags in the repository
8
12
permissions :
9
13
contents : write
10
14
11
15
runs-on : ubuntu-latest
12
16
13
17
steps :
18
+ # Generate a new version tag based on commit history
14
19
- name : Generate Tag
15
20
uses :
cvxgrp/.github/actions/[email protected]
16
21
with :
17
22
github_token : ${{ secrets.GITHUB_TOKEN }}
23
+
24
+ # Publish the package to PyPI
25
+ publish :
26
+ # This job runs after the tag job completes successfully
27
+ needs : tag
28
+ runs-on : ubuntu-latest
29
+ # Use the release environment for PyPI credentials
30
+ environment : release
31
+
32
+ permissions :
33
+ # Read access to repository contents
34
+ contents : read
35
+ # This permission is required for trusted publishing to PyPI
36
+ id-token : write
37
+
38
+ steps :
39
+ # Download the built distribution package
40
+ - uses : actions/download-artifact@v4
41
+ with :
42
+ name : dist
43
+ path : dist
44
+
45
+ # Publish the package to PyPI using trusted publishing
46
+ - name : Publish to PyPI
47
+ uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments