Skip to content

Commit

Permalink
Merge pull request #110 from uktrade/ci/fix-version
Browse files Browse the repository at this point in the history
ci: fix version handling in deploy
  • Loading branch information
michalc authored Oct 21, 2024
2 parents 970c681 + a50e2dc commit 447d83e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/deploy-package-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

- name: Update version in pyproject.toml from current git tag
run: |
sed -i "s/0\\.0\\.0\\.dev0/${GITHUB_REF_NAME}/g" pyproject.toml
sed -i "s/0\\.0\\.0\\.dev0/${GITHUB_REF_NAME/v/}/g" pyproject.toml
- uses: actions/setup-python@v4
with:
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:

- name: Update version in pyproject.toml from current git tag
run: |
sed -i "s/0\\.0\\.0\\.dev0/${GITHUB_REF_NAME}/g" pyproject.toml
sed -i "s/0\\.0\\.0\\.dev0/${GITHUB_REF_NAME/v/}/g" pyproject.toml
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:

- name: Update version in pyproject.toml from current git tag
run: |
sed -i "" "s/0\\.0\\.0\\.dev0/${GITHUB_REF_NAME}/g" pyproject.toml
sed -i "" "s/0\\.0\\.0\\.dev0/${GITHUB_REF_NAME/v/}/g" pyproject.toml
- name: Build package
run: |
Expand Down Expand Up @@ -142,7 +142,7 @@ jobs:

- name: Update version in pyproject.toml from current git tag
run: |
(Get-Content pyproject.toml).Replace('0.0.0.dev0', $Env:GITHUB_REF_NAME) | Set-Content pyproject.toml
(Get-Content pyproject.toml).Replace('0.0.0.dev0', ($Env:GITHUB_REF_NAME).Replace('v', '')) | Set-Content pyproject.toml
- name: Build package
run: |
Expand Down

0 comments on commit 447d83e

Please sign in to comment.