Release file check #11
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 🆙 Release file check | |
on: | |
release: | |
types: [ released ] | |
jobs: | |
validate: | |
name: Validate | |
environment: Deployment | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.x" | |
- name: Check release | |
id: check_release | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install poetry githubrelease httpx==0.18.2 autopub | |
echo "release=$(autopub check)" >> $GITHUB_OUTPUT | |
- uses: mshick/add-pr-comment@v2 | |
if: ${{ steps.check_release.outputs.release!='' }} | |
name: add failed release comment | |
with: | |
repo-token: ${{ secrets.BOT_TOKEN }} | |
message: | | |
${{ steps.check_release.outputs.release }} | |
- uses: mshick/add-pr-comment@v2 | |
if: ${{ steps.check_release.outputs.release=='' }} | |
name: add release comment | |
with: | |
repo-token: ${{ secrets.BOT_TOKEN }} | |
message-path: ./RELEASE.md | |
- name: fail if check failed | |
if: ${{ steps.check_release.outputs.release!='' }} | |
run: | | |
exit 1 |