Skip to content

Commit

Permalink
ci: release process now includes a source but with current version
Browse files Browse the repository at this point in the history
The source does not actually include the correct release version to avoid
having to change the source code based on the current or next version. While
this is maybe odd, it makes releasing quite easy. However, as
#136 this makes it slightly harder
to release for Debian.

So we make a version of the source code that has the correct release version,
and add it to the GitHub release. This makes it so any tinkering with versions
is just done in this repository.
  • Loading branch information
michalc committed Aug 10, 2024
1 parent b548587 commit 1d85aca
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/deploy-package-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ jobs:
run: >-
sed -i "s/0\\.0\\.0\\.dev0/${GITHUB_REF/refs\/tags\/v/}/g" pyproject.toml
# This makes it a touch easier/more robust to package for Debian
# See https://github.com/uktrade/stream-zip/issues/136
- name: Update release to include source code with version
run: |
tar --exclude='./.git' -czvf "${GITHUB_REF_NAME}.tar.gz" .
gh release upload "${GITHUB_REF_NAME}" "${GITHUB_REF_NAME}.tar.gz" "Source code (with release version)"
rm "${GITHUB_REF_NAME}.tar.gz"
- run: |
pip install build
python -m build
Expand Down

0 comments on commit 1d85aca

Please sign in to comment.