From da46234108199cb1717e9504cf5f440788806f73 Mon Sep 17 00:00:00 2001 From: Phillip Jensen Date: Tue, 26 Nov 2024 14:59:20 +0100 Subject: [PATCH] Update publish.yml --- .github/workflows/publish.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 76865fe..6af3b86 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -19,7 +19,7 @@ jobs: - name: Install build tools run: | python -m pip install --upgrade pip - pip install build twine + pip install build twine tomli - name: Get git release tag run: echo "git-release-tag=golem-cert-companion $(git describe --tags)" >> $GITHUB_OUTPUT @@ -27,8 +27,8 @@ jobs: - name: Get package version run: | - VERSION=$(python -c "from configparser import ConfigParser; p = ConfigParser(); p.read('pyproject.toml'); print(p['project']['version'])") - echo "package-version=golem-cert-companion $VERSION" >> $GITHUB_OUTPUT + VERSION=$(python -c "import tomli; print('golem-cert-companion ' + tomli.load(open('pyproject.toml', 'rb'))['project']['version'])") + echo "package-version=$VERSION" >> $GITHUB_OUTPUT id: package_version - name: Fail on version mismatch