setup action to publish releases on github

This commit is contained in:
Guilhem Saurel 2021-08-07 17:50:49 +02:00
parent 528940abcc
commit 530f40a129
3 changed files with 20 additions and 15 deletions

View file

@ -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/*

19
.github/workflows/release.yml vendored Normal file
View file

@ -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 }}

View file

@ -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 "key" to be passed as a parameter
- allow "room_id" to be passed as a parameter or with the data - allow "room_id" to be passed as a parameter or with the data
- rename "text" to "body". - rename "text" to "body".
- Publish releases also on github from github actions
## [3.1.1] - 2021-07-18 ## [3.1.1] - 2021-07-18