Create workflow to automatically notify APT repository when a release is published (adapted from HALPI2-firmware).
Implementation details:
Create .github/workflows/release-published.yml (adapted from HALPI2-firmware/release.yml):
Trigger: Release published (not draft, not pre-release)
Actions:
- Extract version from release tag (strip leading 'v')
- Trigger repository dispatch to
apt.hatlabs.fi repository
- Send payload with package name, version, and source repository
Required Secret:
APT_REPO_PAT - Personal Access Token with repo dispatch permissions
Workflow:
on:
release:
types: [published]
jobs:
notify-apt-repo:
- Extract version from tag
- Trigger repository dispatch
- Repository: hatlabs/apt.hatlabs.fi
- Event type: package-updated
- Payload: {package: "halpid", version: "<version>", repository: "<repo>"}
Test scenarios:
- Publishing a draft release triggers APT repo update
- Version is correctly extracted from tag (v5.0.0 -> 5.0.0)
- Repository dispatch is sent successfully
- APT repo receives and processes the notification
Acceptance criteria:
Caveats:
- Requires PAT secret configured in repository settings
- PAT must have
repo scope for repository dispatch
- APT repository must be configured to handle package-updated events
- Only triggers on published releases, not when editing release notes
Dependencies:
Create workflow to automatically notify APT repository when a release is published (adapted from HALPI2-firmware).
Implementation details:
Create
.github/workflows/release-published.yml(adapted from HALPI2-firmware/release.yml):Trigger: Release published (not draft, not pre-release)
Actions:
apt.hatlabs.firepositoryRequired Secret:
APT_REPO_PAT- Personal Access Token with repo dispatch permissionsWorkflow:
Test scenarios:
Acceptance criteria:
Caveats:
reposcope for repository dispatchDependencies: