From e8e0b6a5c9c57a1acfe79e7b25a111121c452d73 Mon Sep 17 00:00:00 2001 From: Alex Viscreanu Date: Tue, 2 Mar 2021 07:04:12 +0100 Subject: [PATCH] feat(ci): automated pypi release and changelog --- .github/workflows/release.yml | 52 +++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..006ec2d --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,52 @@ +--- +name: Release +on: + push: + tags: + - "v*" + +jobs: + build-and-publish: + name: Publish PyPI package + runs-on: ubuntu-l + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: "3.x" + - name: Install dependencies + run: >- + python -m + pip install + setuptools + wheel + --user + - name: Build wheels + run: >- + python + setup.py + sdist + bdist_wheel + --universal + - name: Publish package to pypi.org + if: startsWith(github.event.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.pypi_password }} + + release-notes: + name: Release Notes + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Generate changelog + uses: docker://aevea/release-notary + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}