2 name: Release announcement
4 # yamllint disable-line rule:truthy
9 if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
10 runs-on: ubuntu-latest
12 - name: Checkout repository
13 uses: actions/checkout@v4
16 uses: devops-actions/action-get-tag@v1.0.2
19 VER=$(echo "${{ steps.tag.outputs.tag }}" | tr . -)
20 echo "ANCHOR=${VER}" >> $GITHUB_ENV
21 - name: Configure Python
22 uses: actions/setup-python@v5
25 - name: Generate reno report
27 # fetch last 30 changes
29 pipx run tox -e reno -- report \
30 --version "${{ steps.tag.outputs.tag }}" \
31 2>/dev/null > reno-notes.md || true
32 if grep -q 'reno: FAIL' reno-notes.md
34 touch modified-reno-notes.md
36 sed '/^\.pkg.*$/d' reno-notes.md |
41 sed '1d' > modified-reno-notes.md
43 - name: Create Release Notes
45 gh release create ${{ steps.tag.outputs.tag }} --generate-notes \
46 -F modified-reno-notes.md
48 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}