Skip to content

Commit bf41484

Browse files
anishasthanaopenshift-merge-robot
authored andcommitted
Use Trusted Actions for pypi releases
Signed-off-by: Anish Asthana <[email protected]>
1 parent 3e09ef4 commit bf41484

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

.github/workflows/release.yaml

+7-8
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
runs-on: ubuntu-latest
3030
permissions:
3131
contents: write
32+
id-token: write # This permission is required for trusted publishing
3233
env:
3334
PR_BRANCH_NAME: adjustments-release-${{ github.event.inputs.release-version }}
3435
steps:
@@ -73,6 +74,12 @@ jobs:
7374
fi
7475
env:
7576
GITHUB_TOKEN: ${{ github.TOKEN }}
77+
- name: Create Github release
78+
uses: ncipollo/release-action@v1
79+
with:
80+
tag: "v${{ github.event.inputs.release-version }}"
81+
- name: Publish package distributions to PyPI
82+
uses: pypa/gh-action-pypi-publish@release/v1
7683

7784
- name: Image Build
7885
run: |
@@ -91,11 +98,3 @@ jobs:
9198
- name: Image Push Latest
9299
if: ${{ inputs.is-latest }}
93100
run: docker push quay.io/${{ github.event.inputs.quay-organization }}/notebook:latest
94-
- name: Create Github release
95-
uses: ncipollo/release-action@v1
96-
with:
97-
tag: "v${{ github.event.inputs.release-version }}"
98-
- name: Set Pypi token
99-
run: poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
100-
- name: Publish new release to Pypi repository
101-
run: poetry publish

0 commit comments

Comments
 (0)