Skip to content

feat: add test action for release notes #2

feat: add test action for release notes

feat: add test action for release notes #2

name: Test GitHub Release Tag and Notes Extraction
on:
push:
branches: [ release/**, hotfix/** ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.12' ]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install flake8 poetry
poetry install
- name: Install
run: |
poetry build
python3 -m pip install dist/*.whl
- name: Extract release notes
id: extract-release-notes
uses: ffurrer2/extract-release-notes@v1
with:
changelog_file: CHANGELOG.md
- name: Retrieve version
run: |
echo "TAG_NAME=$(slack-watchman -v | awk '{match($0, /[0-9]+\.[0-9]+\.[0-9]+/); print substr($0, RSTART, RLENGTH)}')" >> $GITHUB_OUTPUT
id: version
- name: Test tag and release notes
# This step prints the tag and release notes to the console for verification before creating the release.
run: |
echo "Tag: ${{ steps.version.outputs.TAG_NAME }}"
echo "Release Notes: ${{ steps.extract-release-notes.outputs.release_notes }}"