diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml index af438ae4..0a08b6ae 100644 --- a/.github/workflows/pythonpublish.yml +++ b/.github/workflows/pythonpublish.yml @@ -25,3 +25,21 @@ jobs: run: | python setup.py sdist bdist_wheel twine upload dist/* + - name: Determine tag + id: determine_tag + run: | + echo "::set-output name=TAG_VERSION::$(ls dist/readalongs-*.tar.gz | sed -e 's/.*readalongs-//' -e 's/.tar.gz.*//')" + - name: Bump version and push tag + id: tag_version + uses: mathieudutour/github-tag-action@v5.5 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + custom_tag: ${{ steps.determine_tag.outputs.TAG_VERSION }} + - name: Create a GitHub release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ steps.tag_version.outputs.new_tag }} + release_name: Release ${{ steps.tag_version.outputs.new_tag }} + body: ${{ steps.tag_version.outputs.changelog }}