This repository was archived by the owner on Feb 15, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (48 loc) · 1.79 KB
/
release.yml
File metadata and controls
57 lines (48 loc) · 1.79 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
47
48
49
50
51
52
53
54
55
56
57
name: Release Published
on:
release:
types: [published]
permissions:
contents: read
env:
APT_DISTRO: ${{ vars.APT_DISTRO || 'trixie' }}
APT_COMPONENT: ${{ vars.APT_COMPONENT || 'hatlabs' }}
jobs:
dispatch-to-apt:
runs-on: ubuntu-latest
# Only handle stable releases - pre-releases are handled by main.yml
if: ${{ github.event.release.prerelease == false }}
steps:
- name: Verify release has assets
run: |
STABLE_TAG="${{ github.event.release.tag_name }}"
ASSET_COUNT=$(gh release view "$STABLE_TAG" --repo ${{ github.repository }} --json assets --jq '.assets | length')
if [ "$ASSET_COUNT" -eq 0 ]; then
echo "❌ Error: Release has no assets attached"
echo "The .deb package should have been attached when the draft was created"
exit 1
fi
echo "✅ Release has $ASSET_COUNT asset(s)"
env:
GH_TOKEN: ${{ github.token }}
- name: Trigger APT repository
uses: peter-evans/repository-dispatch@v4
with:
token: ${{ secrets.REPO_DISPATCH_PAT }}
repository: hatlabs/apt.hatlabs.fi
event-type: package-updated
client-payload: |
{
"repository": "${{ github.repository }}",
"distro": "${{ env.APT_DISTRO }}",
"channel": "stable",
"component": "${{ env.APT_COMPONENT }}"
}
- name: Report success
run: |
STABLE_TAG="${{ github.event.release.tag_name }}"
echo "=== Stable Release Published ==="
echo "Stable tag: $STABLE_TAG"
echo "Release URL: https://github.com/${{ github.repository }}/releases/tag/$STABLE_TAG"
echo ""
echo "✅ Dispatched to apt.hatlabs.fi stable channel"