From 47dae56a225b16ca91ad1826765e53f027bed4f0 Mon Sep 17 00:00:00 2001 From: elisallenens Date: Wed, 17 May 2023 15:56:09 +0200 Subject: [PATCH 1/2] use pypa build package to build release --- .github/workflows/release.yml | 4 ++-- CHANGES.rst | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3e84e4d..29d8d74 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: diff --git a/CHANGES.rst b/CHANGES.rst index 26ec269..7c4b836 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,7 +4,7 @@ Changelog of hydxlib 1.5.2 (unreleased) ------------------ -- Nothing changed yet. +- Build the release with the build package instead of setuptools. 1.5.1 (2023-05-17) From 8ca47735e2d2e7338259e415f84e427aca73d8e8 Mon Sep 17 00:00:00 2001 From: elisallenens Date: Wed, 17 May 2023 15:57:27 +0200 Subject: [PATCH 2/2] use support github action for github release --- .github/workflows/release.yml | 28 ++-------------------------- CHANGES.rst | 1 + 2 files changed, 3 insertions(+), 26 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 29d8d74..af078a0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 7c4b836..a9ef6ce 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,7 @@ Changelog of hydxlib ------------------ - 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)