From d4b9b15d1eb3ba63f261ffe33836b386cc7345aa Mon Sep 17 00:00:00 2001 From: hmasdev Date: Wed, 3 Apr 2024 22:34:11 +0900 Subject: [PATCH] Update build process to include tar.gz and whl file names --- .github/workflows/on_push_tags.yaml | 10 ++++++++-- pyproject.toml | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/on_push_tags.yaml b/.github/workflows/on_push_tags.yaml index 406b196..fbdc4e3 100644 --- a/.github/workflows/on_push_tags.yaml +++ b/.github/workflows/on_push_tags.yaml @@ -38,6 +38,10 @@ jobs: - name: Build run: | python setup.py sdist bdist_wheel + $TARGZNAME = (Get-ChildItem -Name .\dist\*.tar.gz) + $WHLNAME = (Get-ChildItem -Name .\dist\*.whl) + echo "TARGZNAME=$TARGZNAME" | Out-File -FilePath $env:GITHUB_ENV -Append + echo "WHLNAME=$WHLNAME" | Out-File -FilePath $env:GITHUB_ENV -Append - name: Release id: release @@ -56,7 +60,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.release.outputs.upload_url }} - asset_path: dist/*.tar.gz + asset_path: dist\${{ env.TARGZNAME }} + asset_name: ${{ env.TARGZNAME }} asset_content_type: application/gzip - name: Publish .whl @@ -65,5 +70,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.release.outputs.upload_url }} - asset_path: dist/*.whl + asset_path: dist\${{ env.WHLNAME }} + asset_name: ${{ env.WHLNAME }} asset_content_type: application/zip diff --git a/pyproject.toml b/pyproject.toml index 1bff177..8f203ba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools", "wheel"] +requires = ["setuptools"] build-backend = "setuptools.build_meta" [tool.setuptools.packages.find]