1
1
name : Publish Python Package
2
2
# Publishes to
3
- # - PyPI on releases created in GitHub UI
4
3
# - TestPyPI on new tags "v1.2.3" or "v1.2.3.something" on main branch
4
+ # - PyPI on releases created in GitHub UI
5
5
6
6
on :
7
7
push :
@@ -17,10 +17,10 @@ jobs:
17
17
name : Build Python 🐍 distributions 📦 for publishing
18
18
runs-on : ubuntu-latest
19
19
steps :
20
- - uses : actions/checkout@v4
20
+ - uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
21
21
22
22
- name : Set up Python
23
- uses : actions/setup-python@v5
23
+ uses : actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f
24
24
with :
25
25
python-version : 3.12
26
26
31
31
run : hatch build
32
32
33
33
- name : Store built distribution
34
- uses : actions/upload-artifact@v4
34
+ uses : actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a
35
35
with :
36
36
name : distribution-files
37
37
path : dist/
@@ -47,12 +47,11 @@ jobs:
47
47
id-token : write # this permission is mandatory for trusted publishing
48
48
steps :
49
49
- name : Download built distribution
50
- uses : actions/download-artifact@v3
50
+ uses : actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
51
51
with :
52
52
name : distribution-files
53
53
path : dist
54
54
55
- # version pinned by dependabot of [2]
56
55
- name : Publish package 📦 to Test PyPI
57
56
if : github.event_name == 'push'
58
57
uses : pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0
64
63
uses : pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0
65
64
66
65
# [1] https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
67
- # [2] https://github.com/pypa/gh-action-pypi-publish/
66
+ # Used actions: (updates managed by dependabot)
67
+ # - https://github.com/actions/checkout
68
+ # - https://github.com/actions/setup-python
69
+ # - https://github.com/actions/upload-artifact
70
+ # - https://github.com/actions/download-artifact
71
+ # - https://github.com/pypa/gh-action-pypi-publish/
0 commit comments