5353 # which are saved in the 'dist/' directory.
5454 - name : Build release distributions
5555 run : |
56- poetry build
56+ poetry build
57+ echo "WHEEL_PATH=$(find $GITHUB_WORKSPACE/dist -name '*.whl')" >> $GITHUB_ENV
58+ echo "TAR_PATH=$(find $GITHUB_WORKSPACE/dist -name '*.tar.gz')" >> $GITHUB_ENV
5759
5860 # Step 7: Create GitHub Release
5961 # - This step creates a new GitHub release based on the tag that triggered the workflow.
@@ -76,18 +78,13 @@ jobs:
7678 ls -la ./dist
7779 pwd
7880
79- - name : Rename wheel file
80- run : |
81- mv dist/prometheus_remote_writer-*.whl dist/prometheus_remote_writer-${{ github.ref_name }}.whl
82- mv dist/prometheus_remote_writer-*.tar.gz dist/prometheus_remote_writer-${{ github.ref_name }}.tar.gz
83-
8481 - name : Upload Release Assets
8582 uses : actions/upload-release-asset@v1
8683 env :
8784 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
8885 with :
8986 upload_url : ${{ steps.create_release.outputs.upload_url }}
90- asset_path : dist/prometheus_remote_writer- ${{ github.ref_name }}.whl
87+ asset_path : ${{ env.WHEEL_PATH }}
9188 asset_name : prometheus_remote_writer-${{ github.ref_name }}.whl
9289 asset_content_type : application/zip
9390
9794 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
9895 with :
9996 upload_url : ${{ steps.create_release.outputs.upload_url }}
100- asset_path : dist/prometheus_remote_writer- ${{ github.ref_name }}.tar.gz
97+ asset_path : ${{ env.TAR_PATH }}
10198 asset_name : prometheus_remote_writer-${{ github.ref_name }}.tar.gz
10299 asset_content_type : application/gzip
103100
0 commit comments