diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 59dcd4a..033a826 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,15 +1,12 @@ --- -# cspell:ignore mislav name: release -"on": +on: release: types: [published] - workflow_dispatch: jobs: - pypi: - name: Publish to PyPI registry + release: environment: release runs-on: ubuntu-22.04 permissions: @@ -18,13 +15,12 @@ jobs: env: FORCE_COLOR: 1 PY_COLORS: 1 - TOXENV: pkg steps: - - name: Switch to using Python 3.10 by default + - name: Switch to using Python 3.12 by default uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "3.12" - name: Install tox run: python3 -m pip install --user "tox>=4.0.0" @@ -33,12 +29,20 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 # needed by setuptools-scm - submodules: true - name: Build dists - run: python -m tox + run: python3 -m tox -e pkg - name: Publish to pypi.org - if: >- # "create" workflows run separately from "push" & "pull_request" - github.event_name == 'release' uses: pypa/gh-action-pypi-publish@release/v1 + + forum_post: + needs: release + runs-on: ubuntu-22.04 + + steps: + - name: Retreive the forum post script from team-devtools + run: curl -O https://raw.githubusercontent.com/ansible/team-devtools/main/.github/workflows/forum_post.py + + - name: Run the forum post script + run: python3 forum_post.py ${{ github.event.repository.full_name }} ${{ github.event.release.tag_name }} ${{ secrets.FORUM_KEY }} ${{ secrets.FORUM_USER }}