Skip to content

Commit

Permalink
Update releasing.yml to work with new semantic versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
kavanase committed Jul 18, 2023
1 parent c07bf8b commit 5cd958e
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/releasing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,31 +38,25 @@ jobs:
run: |
python setup.py sdist bdist_wheel
- name: Generate release tag
id: generate_release_tag
uses: amitsingh-007/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag_prefix: 'v'

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

- name: Write release info
- name: Generate release info
run: |
awk 'BEGIN {p = 0} {a = 0 }; /^v\d*.\d*.\d*./ { p += 1; a = 1}; p + a == 1 { print } ' CHANGELOG.rst | sed -e '1,1d' | sed -e '/./,$!d' -e :a -e '/^\n*$/{$d;N;ba' -e '}' > release_info.txt
echo "version=$(grep version setup.py | awk -F\" '{print $2}')" >> $GITHUB_ENV
- name: Release
uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.generate_release_tag.outputs.next_release_tag }}
release_name: ${{ steps.generate_release_tag.outputs.next_release_tag }}
tag_name: ${{ env.version }}
release_name: ${{ env.version }}
body_path: release_info.txt
draft: false
prerelease: false

0 comments on commit 5cd958e

Please sign in to comment.