File tree 4 files changed +47
-13
lines changed 4 files changed +47
-13
lines changed Original file line number Diff line number Diff line change @@ -579,6 +579,9 @@ jobs:
579
579
580
580
permissions :
581
581
contents : write
582
+ id-token : write
583
+
584
+ environment : pypi-ddev
582
585
583
586
steps :
584
587
- name : Download Python artifacts
@@ -601,12 +604,15 @@ jobs:
601
604
path : installers
602
605
merge-multiple : true
603
606
607
+ # Publish wheels to PyPI using Trusted Publishers.
608
+ # https://docs.pypi.org/trusted-publishers/using-a-publisher/
609
+ # This job needs to run from within the pypi-ddev environment. PyPi validates the
610
+ # workflow file name, environment and repository the request is comming from to
611
+ # provide the valid JWT token.
604
612
- name : Push Python artifacts to PyPI
605
613
uses : pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
606
614
with :
607
615
skip-existing : true
608
- user : __token__
609
- password : ${{ secrets.PYPI_TOKEN_DDEV_2 }}
610
616
611
617
- name : Add assets to current release
612
618
uses : softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631 # v2.2.2
Original file line number Diff line number Diff line change 21
21
name : Build wheel
22
22
runs-on : ubuntu-latest
23
23
24
+ environment : typo-squatting-release
25
+
24
26
steps :
25
27
- name : Checkout code
26
28
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
46
48
# Only uploading the missing wheels makes this job idempotent and reduces its complexity.
47
49
skip-existing : true
48
50
user : __token__
49
- password : ${{ secrets.INTEGRATIONS_PYPI_NAME_CLAIM }}
51
+ password : ${{ secrets.PYPI_TOKEN }}
Original file line number Diff line number Diff line change 9
9
release :
10
10
runs-on : ubuntu-latest
11
11
12
+ permissions :
13
+ id-token : write
14
+
15
+ environment : pypi-datadog-checks-base
16
+
12
17
steps :
13
18
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
14
19
30
35
ddev config set repos.core .
31
36
ddev config set repo core
32
37
33
- - name : Release base package
34
- run : ddev release upload -s datadog_checks_base
35
- env :
36
- TWINE_USERNAME : __token__
37
- TWINE_PASSWORD : ${{ secrets.PYPI_TOKEN_BASE_2 }}
38
+ - name : Build base package
39
+ run : ddev release build datadog_checks_base
40
+
41
+ # Publish wheels to PyPI using Trusted Publishers.
42
+ # https://docs.pypi.org/trusted-publishers/using-a-publisher/
43
+ # This job needs to run from within the pypi-datadog-checks-base environment. PyPi
44
+ # validates the workflow file name, environment and repository the request is
45
+ # comming from to provide the valid JWT token.
46
+ - name : Release base package to PyPI
47
+ uses : pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
48
+ with :
49
+ skip-existing : true
50
+ packages-dir : datadog_checks_base/dist
Original file line number Diff line number Diff line change 9
9
release :
10
10
runs-on : ubuntu-latest
11
11
12
+ permissions :
13
+ id-token : write
14
+
15
+ environment : pypi-datadog-checks-dev
16
+
12
17
steps :
13
18
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
14
19
30
35
ddev config set repos.core .
31
36
ddev config set repo core
32
37
33
- - name : Release dev package
34
- run : ddev release upload -s datadog_checks_dev
35
- env :
36
- TWINE_USERNAME : __token__
37
- TWINE_PASSWORD : ${{ secrets.PYPI_TOKEN_DEV_2 }}
38
+ - name : Build dev package
39
+ run : ddev release build datadog_checks_dev
40
+
41
+ # Publish wheels to PyPI using Trusted Publishers.
42
+ # https://docs.pypi.org/trusted-publishers/using-a-publisher/
43
+ # This job needs to run from within the pypi-datadog-checks-dev environment. PyPi
44
+ # validates the workflow file name, environment and repository the request is
45
+ # comming from to provide the valid JWT token.
46
+ - name : Release dev package to PyPI
47
+ uses : pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
48
+ with :
49
+ skip-existing : true
50
+ packages-dir : datadog_checks_dev/dist
You can’t perform that action at this time.
0 commit comments