diff --git a/.github/workflows/create_release.yaml b/.github/workflows/create_release.yaml index 35758be..f8c9cb2 100644 --- a/.github/workflows/create_release.yaml +++ b/.github/workflows/create_release.yaml @@ -18,11 +18,16 @@ jobs: with: python-version: 3.8 - name: Build project + id: build_package run: | python -m pip install --upgrade pip python -m pip install -r requirements.txt python -m pip install sdist wheel python setup.py sdist bdist_wheel + TARNAME=$(ls -1 dist/pyhpo*.tar.gz | head -n 1) + echo "::set-output name=tar_filename::$TARNAME" + WHEELNAME=$(ls -1 dist/pyhpo*.whl | head -n 1) + echo "::set-output name=wheel_filename::$WHEELNAME" - name: Create Release id: create_release uses: actions/create-release@v1 @@ -40,8 +45,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: ./dist/pyhpo-${{ github.ref }}.tar.gz - asset_name: pyhpo-${{ github.ref }}.tar.gz + asset_path: ./${{ steps.build_package.outputs.tar_filename }} + asset_name: ${{ steps.build_package.outputs.tar_filename }} asset_content_type: application/x-tgz - name: Upload wheel Asset id: upload-wheel-asset @@ -50,8 +55,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: ./dist/pyhpo-${{ github.ref }}-py3-none-any.whl - asset_name: pyhpo-${{ github.ref }}-py3-none-any.whl + asset_path: ./${{ steps.build_package.outputs.wheel_filename }} + asset_name: ${{ steps.build_package.outputs.wheel_filename }} asset_content_type: application/wheel - name: Publish distribution to PyPI id: upload-package-to-PyPI