Skip to content

Add GitHub Actions workflow to auto-publish to Packagist#142

Merged
shannah merged 1 commit intomasterfrom
claude/github-packagist-workflow-Qk2DM
Apr 24, 2026
Merged

Add GitHub Actions workflow to auto-publish to Packagist#142
shannah merged 1 commit intomasterfrom
claude/github-packagist-workflow-Qk2DM

Conversation

@shannah
Copy link
Copy Markdown
Owner

@shannah shannah commented Apr 24, 2026

Summary

This PR adds a GitHub Actions workflow that automatically notifies Packagist when a new release is published, ensuring the package stays up-to-date on Packagist.

Key Changes

  • Added .github/workflows/packagist.yml workflow file that:
    • Triggers on release publication or manual workflow dispatch
    • Calls the Packagist API to update the package metadata
    • Uses stored secrets for authentication (PACKAGIST_USERNAME and PACKAGIST_TOKEN)
    • Validates the HTTP response and fails the workflow if the update is unsuccessful (non-2xx status codes)

Implementation Details

  • The workflow uses curl to POST to Packagist's update-package API endpoint
  • Credentials are passed as query parameters using GitHub secrets
  • Response status code is captured and validated to ensure successful package updates
  • The workflow will fail if Packagist returns an error status, preventing silent failures

https://claude.ai/code/session_019HYxHnrGCeEE1S5kQQnwM1

Triggers Packagist's update-package API when a GitHub release is
published, so the xataface/xataface package picks up new tags without
manual intervention. Also runnable via workflow_dispatch.

Requires repository secrets PACKAGIST_USERNAME and PACKAGIST_TOKEN.

https://claude.ai/code/session_019HYxHnrGCeEE1S5kQQnwM1
@shannah shannah merged commit 598f147 into master Apr 24, 2026
12 checks passed
@shannah shannah deleted the claude/github-packagist-workflow-Qk2DM branch April 24, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants