diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml deleted file mode 100644 index ee77ec4..0000000 --- a/.github/workflows/pypi.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: PyPI - -on: - push: - tags: - - 'v*' - -jobs: - pypi: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: pip install -U poetry twine wheel - - run: poetry build - - run: twine upload --non-interactive -u __token__ -p ${{ secrets.PYPI_TOKEN }} dist/* diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..9d52615 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,19 @@ +name: Release on GitHub & PyPI + +on: + push: + tags: + - 'v*' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: pip install -U poetry twine wheel + - run: poetry build + - run: twine upload --non-interactive -u __token__ -p ${{ secrets.PYPI_TOKEN }} dist/* + - run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV + - run: gh release create -t "Release ${{ env.TAG}}" -n "$(awk '/## \[${{ env.TAG }}] - /{flag=1;next}/## \[/{flag=0}flag' CHANGELOG.md)" ${{ env.TAG }} dist/* + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 168d746..66a1d03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - allow "key" to be passed as a parameter - allow "room_id" to be passed as a parameter or with the data - rename "text" to "body". +- Publish releases also on github from github actions ## [3.1.1] - 2021-07-18