Skip to content

Commit b76a3f5

Browse files
committed
Update release to include forum post
1 parent 5f406ae commit b76a3f5

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

.github/workflows/release.yml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
---
2-
# cspell:ignore mislav
32
name: release
43

5-
"on":
4+
on:
65
release:
76
types: [published]
8-
workflow_dispatch:
97

108
jobs:
11-
pypi:
12-
name: Publish to PyPI registry
9+
release:
1310
environment: release
1411
runs-on: ubuntu-22.04
1512
permissions:
@@ -18,13 +15,12 @@ jobs:
1815
env:
1916
FORCE_COLOR: 1
2017
PY_COLORS: 1
21-
TOXENV: pkg
2218

2319
steps:
24-
- name: Switch to using Python 3.10 by default
20+
- name: Switch to using Python 3.12 by default
2521
uses: actions/setup-python@v5
2622
with:
27-
python-version: "3.10"
23+
python-version: "3.12"
2824

2925
- name: Install tox
3026
run: python3 -m pip install --user "tox>=4.0.0"
@@ -33,12 +29,20 @@ jobs:
3329
uses: actions/checkout@v4
3430
with:
3531
fetch-depth: 0 # needed by setuptools-scm
36-
submodules: true
3732

3833
- name: Build dists
39-
run: python -m tox
34+
run: python3 -m tox -e pkg
4035

4136
- name: Publish to pypi.org
42-
if: >- # "create" workflows run separately from "push" & "pull_request"
43-
github.event_name == 'release'
4437
uses: pypa/gh-action-pypi-publish@release/v1
38+
39+
forum_post:
40+
needs: release
41+
runs-on: ubuntu-22.04
42+
43+
steps:
44+
- name: Retreive the forum post script from team-devtools
45+
run: curl -O https://raw.githubusercontent.com/ansible/team-devtools/main/.github/workflows/forum_post.py
46+
47+
- name: Run the forum post script
48+
run: python3 forum_post.py ${{ github.event.repository.full_name }} ${{ github.event.release.tag_name }} ${{ secrets.FORUM_KEY }} ${{ secrets.FORUM_USER }}

0 commit comments

Comments
 (0)