-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (38 loc) · 1.17 KB
/
release_check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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