Tracking Releases from GitHub Actions and GitLab CI
Automate release registration from your CI/CD pipeline.
Why Track Releases?
Registering releases from CI/CD lets you:
- See which deployment introduced an error
- Compare error rates between versions
- Run AI impact analysis on each release
- Know exactly what's deployed at any time
GitHub Actions
Add this step to your deployment workflow:
YAML
- name: Register Lognitor Release
run: |
curl -s -X POST $LOGNITOR_API_URL/releases/register \
-H "Content-Type: application/json" \
-H "X-API-Key: ${{ secrets.LOGNITOR_API_KEY }}" \
-d '{
"version": "${{ github.sha }}",
"commit_hash": "${{ github.sha }}",
"branch": "${{ github.ref_name }}",
"deployed_by": "github-actions",
"changelog": "${{ github.event.head_commit.message }}"
}'
env:
LOGNITOR_API_URL: ${{ secrets.LOGNITOR_API_URL }}GitLab CI
YAML
register_release:
stage: deploy
script:
- |
curl -s -X POST ${LOGNITOR_API_URL}/releases/register \
-H "Content-Type: application/json" \
-H "X-API-Key: ${LOGNITOR_API_KEY}" \
-d "{
\"version\": \"${CI_COMMIT_SHA}\",
\"branch\": \"${CI_COMMIT_REF_NAME}\",
\"deployed_by\": \"gitlab-ci\"
}"After Registration
All logs sent after the release registration automatically include the release context. Check the Releases page in the dashboard to see your deployment history.