From 92966070ac936728dd4c4c25232a1d74648136c7 Mon Sep 17 00:00:00 2001 From: Michal Charemza Date: Sat, 10 Aug 2024 15:44:09 +0100 Subject: [PATCH] ci: release process now includes a file with the source, but modified with correct version From https://github.com/uktrade/stream-zip/issues/136, this makes it a touch easier/more robust to package for Debian --- .github/workflows/deploy-package-to-pypi.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-package-to-pypi.yml b/.github/workflows/deploy-package-to-pypi.yml index b2302c1..a8c0964 100644 --- a/.github/workflows/deploy-package-to-pypi.yml +++ b/.github/workflows/deploy-package-to-pypi.yml @@ -8,7 +8,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-python@v3 with: @@ -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