Skip to content

Commit

Permalink
Update release to include forum post (ansible#228)
Browse files Browse the repository at this point in the history
  • Loading branch information
cidrblock authored Jul 24, 2024
1 parent 5f406ae commit c7e5a5d
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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"
Expand All @@ -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 }}

0 comments on commit c7e5a5d

Please sign in to comment.