Skip to content

Commit 7802a0a

Browse files
build: Fix pypi publish CU-869a1x4fh (#72)
* build(medcat-trainer): Fix pypi publish paths for medcat-trainer client * build: Fix pypi publish for medcat now that the secrets are added
1 parent e07bef5 commit 7802a0a

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

.github/workflows/medcat-trainer_qa.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
with:
4949
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
5050
repository_url: https://test.pypi.org/legacy/
51-
packages-dir: medcat-trainer/dist
51+
packages_dir: medcat-trainer/client/dist
5252

5353
# Build and test webapp container
5454
build-and-push:
@@ -75,7 +75,7 @@ jobs:
7575
uses: docker/login-action@v3
7676
with:
7777
username: ${{ secrets.DOCKERHUB_USERNAME }}
78-
password: ${{ secrets.DOCKERHUB_TOKEN }}
78+
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
7979

8080
- name: Push to DockerHub
8181
run: |

.github/workflows/medcat-trainer_release.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ jobs:
2020
ref: "main"
2121

2222
- name: Release Tag
23-
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
23+
# If GITHUB_REF=refs/tags/medcat-trainer/v0.1.2, this returns v0.1.2. Note it's including the "v" though it probably shouldnt
24+
run: echo "RELEASE_VERSION=${GITHUB_REF##refs/*/}" >> $GITHUB_ENV
2425

2526
- name: Set up Python
2627
uses: actions/setup-python@v4
@@ -51,8 +52,9 @@ jobs:
5152
if: startsWith(github.ref, 'refs/tags') && ! github.event.release.prerelease
5253
uses: pypa/[email protected]
5354
with:
55+
# TODO CU-869a25n7e Use Trusted Platform Publisher based PyPI release
5456
password: ${{ secrets.PYPI_API_TOKEN }}
55-
packages-dir: medcat-trainer/dist
57+
packages_dir: medcat-trainer/client/dist
5658

5759
# Build and test webapp container
5860
build-and-push:
@@ -83,7 +85,7 @@ jobs:
8385
uses: docker/login-action@v3
8486
with:
8587
username: ${{ secrets.DOCKERHUB_USERNAME }}
86-
password: ${{ secrets.DOCKERHUB_TOKEN }}
88+
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
8789

8890
- name: Push to DockerHub
8991
env:

.github/workflows/medcat-v1_main.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,11 @@ jobs:
7474
python tests/check_deprecations.py "$VERSION" --next-version --remove-prefix
7575
7676
publish-to-test-pypi:
77-
# Disable pypy publish waiting for TEST_PYPI_API_TOKEN
7877
if: |
7978
github.repository == 'CogStack/cogstack-nlp' &&
8079
github.ref == 'refs/heads/main' &&
8180
github.event_name == 'push' &&
82-
startsWith(github.ref, 'refs/tags') != true &&
83-
false
81+
startsWith(github.ref, 'refs/tags') != true
8482
runs-on: ubuntu-24.04
8583
timeout-minutes: 45
8684
concurrency: publish-to-test-pypi

.github/workflows/medcat-v1_production.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# TODO: Fix Medcat V1 Release Actions
22
# Disabled waiting for designed release process
3-
# Disabled waiting for PYPI_API_TOKEN
43
name: medcat-v1 - production
54

65
on:
@@ -18,8 +17,7 @@ jobs:
1817
runs-on: ubuntu-24.04
1918
concurrency: build-n-publish-to-pypi
2019
if: |
21-
github.repository == 'CogStack/cogstack-nlp' &&
22-
false
20+
github.repository == 'CogStack/cogstack-nlp'
2321
2422
steps:
2523
- name: Checkout production
@@ -65,4 +63,5 @@ jobs:
6563
if: startsWith(github.ref, 'refs/tags') && ! github.event.release.prerelease
6664
uses: pypa/[email protected]
6765
with:
66+
# TODO CU-869a25n7e Use Trusted Platform Publisher based PyPI release
6867
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)