File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed
examples/pure-hatch/.github/workflows Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Release
2
+
3
+ on :
4
+ release :
5
+ types :
6
+ - published
7
+
8
+ permissions : {} # no permissions to the token at global level
9
+
10
+ jobs :
11
+ build_package :
12
+ name : Build the package
13
+ runs-on : ubuntu-latest
14
+ permissions :
15
+ contents : read # this job only needs read access
16
+ steps :
17
+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
18
+ with :
19
+ persist-credentials : false
20
+ - name : Set up Hatch
21
+ uses : pypa/hatch@257e27e51a6a5616ed08a39a408a21c35c9931bc
22
+ - name : Build artifacts
23
+ run : hatch build
24
+ - uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
25
+ with :
26
+ path : dist/
27
+ name : dist.zip
28
+ if-no-files-found : error
29
+ retention-days : 1
30
+
31
+ publish_release_to_pypi :
32
+ name : Publish release to PyPI
33
+ needs : [build_package]
34
+ runs-on : ubuntu-latest
35
+ environment :
36
+ name : pypi
37
+ url : <URL TO YOUR PROJECT HERE>
38
+ permissions :
39
+ contents : read # this job needs read access
40
+ id-token : write # but also needs to be able to write the publishing token
41
+ steps :
42
+ - uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
43
+ with :
44
+ name : dist.zip
45
+ path : dist/
46
+ - uses : pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
You can’t perform that action at this time.
0 commit comments