You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Use trusted publisher and environment
Setup PyPi for datatrails-python to use a trusted publisher. Delete
any API tokens in PyPi for datatrails-python.
In github repo delete PYPI secrets and create an environmant called
release that is restricted to the main branch.
Copy file name to clipboardExpand all lines: .github/workflows/package.yml
+24-9Lines changed: 24 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,9 @@
1
-
# This workflow will upload a Python Package using Twine when a release is created
2
-
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
1
+
# This workflow will upload a Python Package using a release environment and a trusted publisher.
2
+
# See PyPi management in the datatrails confluence service for an explanation.
3
+
#
4
+
# Create a trusted publisher for datatrails-python in pypi.org and delete any API tokens.
5
+
# In github add an environment called release that is restricted to the main branch and
6
+
# delete any PYPI secrets.
3
7
4
8
name: Package and Publish
5
9
@@ -9,15 +13,19 @@ on:
9
13
10
14
jobs:
11
15
deploy:
16
+
environment: release
17
+
permissions:
18
+
id-token: write # This is required for requesting the JWT
19
+
contents: read # This is required for actions/checkout
0 commit comments