diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3e84e4d..af078a0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,8 +30,8 @@ jobs: - name: Build a source tarball run: | - python -m pip install --upgrade setuptools wheel - python setup.py sdist bdist_wheel + python -m pip install build + python -m build - uses: actions/upload-artifact@v3 with: @@ -50,33 +50,9 @@ jobs: name: artifact path: dist - - name: Create GitHub Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token - with: - tag_name: ${{ github.ref }} - release_name: ${{ github.ref }} - draft: false - prerelease: false - - - name: Get Asset name - run: | - export PKG=$(ls dist/ | grep tar) - set -- $PKG - echo "name=$1" >> $GITHUB_ENV - - - name: Upload Release Asset (sdist) to GitHub + - name: Upload Github release id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: dist/${{ env.name }} - asset_name: ${{ env.name }} - asset_content_type: application/zip + uses: softprops/action-gh-release@v1 - name: Upload Release Assets to PyPI uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/CHANGES.rst b/CHANGES.rst index 26ec269..a9ef6ce 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,7 +4,8 @@ Changelog of hydxlib 1.5.2 (unreleased) ------------------ -- Nothing changed yet. +- Build the release with the build package instead of setuptools. +- Rewrite release workflow to use a supported github action for github release. 1.5.1 (2023-05-17)