Skip to content

Commit

Permalink
fix: GHA - release: replace underscores with hyphens in build filename
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Fiedorowicz <mfiedorowicz@netboxlabs.com>
  • Loading branch information
mfiedorowicz committed Jun 6, 2024
1 parent b7cb223 commit 2fb8262
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ jobs:
BUILD_VERSION: ${{ needs.get-next-version.outputs.new-release-version }}
BUILD_TRACK: release
BUILD_COMMIT: ${{ needs.get-next-version.outputs.short-sha }}
OUTPUT_FILENAME: ${{ env.PYTHON_PACKAGE_NAME }}-${{ needs.get-next-version.outputs.new-release-version }}.tar.gz
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
Expand All @@ -140,11 +141,15 @@ jobs:
cat pyproject.toml | grep version
python3 -m pip install --upgrade build
python3 -m build --sdist --outdir dist/
- name: Replace underscores with hyphens in build filename
run: |
BUILD_FILENAME=$(ls dist/ | grep tar.gz)
mv dist/$BUILD_FILENAME dist/${{ env.OUTPUT_FILENAME }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.PYTHON_PACKAGE_NAME }}-${{ env.BUILD_VERSION }}.tar.gz
path: dist/${{ env.PYTHON_PACKAGE_NAME }}-${{ env.BUILD_VERSION }}.tar.gz
name: ${{ env.OUTPUT_FILENAME }}
path: dist/${{ env.OUTPUT_FILENAME }}
retention-days: 30
if-no-files-found: error
- name: Publish release distributions to PyPI
Expand Down

0 comments on commit 2fb8262

Please sign in to comment.