-
Notifications
You must be signed in to change notification settings - Fork 5
46 lines (40 loc) · 1.36 KB
/
Copy pathcheck-pubdev-and-notify.yml
File metadata and controls
46 lines (40 loc) · 1.36 KB
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
43
44
45
46
name: Check pub.dev and Notify Discord
on:
workflow_run:
workflows: ["Publish to pub.dev"]
types:
- completed
workflow_dispatch:
inputs:
force_check:
description: "Force check even if version exists"
required: false
type: boolean
default: false
jobs:
check-and-notify:
runs-on: ubuntu-latest
# Only run if the publish workflow succeeded or if manually triggered
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Wait for pub.dev processing
if: github.event_name == 'workflow_run'
run: |
echo "Waiting 2 minutes for pub.dev to process the publication..."
sleep 120
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.9"
- name: Install dependencies
run: pip install requests pyyaml
- name: Check pub.dev and notify
env:
DISCORD_RELEASE_WEBHOOK: ${{ secrets.DISCORD_RELEASE_WEBHOOK }}
DISCORD_MAP: ${{ secrets.DISCORD_MAP }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO_NAME: ${{ github.repository }}
FORCE_CHECK: ${{ inputs.force_check }}
run: python .github/scripts/check_pubdev_and_notify.py