From 5cd958e805d2a0b8a180b70d8411597c41ce542b Mon Sep 17 00:00:00 2001 From: Sean Kavanagh Date: Tue, 18 Jul 2023 17:26:30 +0100 Subject: [PATCH] Update `releasing.yml` to work with new semantic versioning --- .github/workflows/releasing.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/releasing.yml b/.github/workflows/releasing.yml index 272cdbd..b6570e1 100644 --- a/.github/workflows/releasing.yml +++ b/.github/workflows/releasing.yml @@ -38,22 +38,16 @@ jobs: run: | python setup.py sdist bdist_wheel - - name: Generate release tag - id: generate_release_tag - uses: amitsingh-007/next-release-tag@v4.0.0 - 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 @@ -61,8 +55,8 @@ jobs: 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 \ No newline at end of file