Skip to content

Commit

Permalink
Merge pull request #52 from nens/51-fix-github-release-action
Browse files Browse the repository at this point in the history
51 fix GitHub release action
  • Loading branch information
elisalle authored May 17, 2023
2 parents c878864 + 8ca4773 commit f116fa7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 29 deletions.
32 changes: 4 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f116fa7

Please sign in to comment.