Skip to content

Commit e142203

Browse files
authored
CU-869a3ycrj Trusted publisher for PyPI (#114)
* CU-869a3ycrj: Add permission to use ID token for trusted publisher * CU-869a3ycrj: Use trusted publisher for test PyPI * CU-869a3ycrj: [TEMP] Allow running of QA workflow during PR / branch push * Revert "CU-869a3ycrj: [TEMP] Allow running of QA workflow during PR / branch push" This reverts commit 5f872a0. * CU-869a3ycrj: Use trusted publishing for trainer client release
1 parent ff76a57 commit e142203

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

.github/workflows/medcat-trainer_qa.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
push:
55
branches: [ main ]
66

7+
permissions:
8+
id-token: write
9+
710
defaults:
811
run:
912
working-directory: ./medcat-trainer
@@ -47,9 +50,8 @@ jobs:
4750
python -m build
4851
4952
- name: Publish dev distribution to Test PyPI
50-
uses: pypa/gh-action-pypi-publish@v1.12.4
53+
uses: pypa/gh-action-pypi-publish@release/v1
5154
with:
52-
password: ${{ secrets.MEDCAT_TRAINER_TEST_PYPI_API_TOKEN }}
5355
repository_url: https://test.pypi.org/legacy/
5456
packages_dir: medcat-trainer/client/dist
5557

.github/workflows/medcat-trainer_release.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
tags:
66
- 'medcat-trainer/v*.*.*'
77

8+
permissions:
9+
id-token: write
10+
811
defaults:
912
run:
1013
working-directory: ./medcat-trainer
@@ -50,10 +53,8 @@ jobs:
5053
5154
- name: Publish production distribution to PyPI
5255
if: startsWith(github.ref, 'refs/tags') && ! github.event.release.prerelease
53-
uses: pypa/gh-action-pypi-publish@v1.12.4
56+
uses: pypa/gh-action-pypi-publish@release/v1
5457
with:
55-
# TODO CU-869a25n7e Use Trusted Platform Publisher based PyPI release
56-
password: ${{ secrets.PYPI_API_TOKEN }}
5758
packages_dir: medcat-trainer/client/dist
5859

5960
# Build and test webapp container

0 commit comments

Comments
 (0)