Repository navigation
feat: add the packagist action for the release workflow - #4
Merged
Merged
Conversation
The action asks packagist.org to update the package of the repo. A repo calls it from the Release workflow only and has no Packagist webhook, so a push to a PR branch never reaches packagist.org. The template templates/packagist.yml holds the job, and the README states the rule and the organization variable and secret.
michal-giergielewicz
enabled auto-merge (squash)
November 15, 2026 21:11
michal-giergielewicz
added a commit
to freyr/monadic
that referenced
this pull request
Nov 15, 2026
## Summary Only the release workflow calls packagist.org (rule of `freyr/.github` v2.1.0). The new job `packagist` runs after each push to `main` and after a manual release. The Packagist webhook of the repo is removed after the first good run, so a push to a pull request branch no longer makes a `dev-<branch>` version on packagist.org. ## Test evidence - `actionlint`: exit 0. - The action itself: see freyr/.github#4. - The first Release run on `main` after the merge shows the call with the real token. ## Release impact None (`ci:`). ## Risk and rollback The job needs the organization secret `PACKAGIST_API_TOKEN`. Without it the job fails with a clear message, and the release job itself is not affected. Rollback: revert this pull request and add the webhook again.
This was referenced Nov 15, 2026
michal-giergielewicz
added a commit
to freyr/identity
that referenced
this pull request
Nov 15, 2026
## Summary Only the release workflow calls packagist.org (rule of `freyr/.github` v2.1.0). The new job `packagist` runs after each push to `main` and after a manual release. The Packagist webhook of the repo is removed after the first good run, so a push to a pull request branch no longer makes a `dev-<branch>` version on packagist.org. ## Test evidence - `actionlint`: exit 0. - The action itself: see freyr/.github#4. - The first Release run on `main` after the merge shows the call with the real token. ## Release impact None (`ci:`). ## Risk and rollback The job needs the organization secret `PACKAGIST_API_TOKEN`. Without it the job fails with a clear message, and the release job itself is not affected. Rollback: revert this pull request and add the webhook again.
michal-giergielewicz
added a commit
to freyr/message-broker
that referenced
this pull request
Nov 15, 2026
## Summary Only the release workflow calls packagist.org (rule of `freyr/.github` v2.1.0). The new job `packagist` runs after each push to `main` and after a manual release. The Packagist webhook of the repo is removed after the first good run, so a push to a pull request branch no longer makes a `dev-<branch>` version on packagist.org. ## Test evidence - `actionlint`: exit 0. - The action itself: see freyr/.github#4. - The first Release run on `main` after the merge shows the call with the real token. ## Release impact None (`ci:`). ## Risk and rollback The job needs the organization secret `PACKAGIST_API_TOKEN`. Without it the job fails with a clear message, and the release job itself is not affected. Rollback: revert this pull request and add the webhook again.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rule: only the release workflow calls packagist.org; a repo has no Packagist webhook.
A Packagist webhook fires on each push, so packagist.org lists each PR branch as a
dev-<branch>version. This change adds the pieces that replace the webhook:actions/packagist: callsPOST https://packagist.org/api/update-packagewith a Bearer header. It fails when an input is empty or when packagist.org does not answer with HTTP 2xx.templates/packagist.yml: the job for the release workflow of a Composer package. It runs after each push tomain, so packagist.org reads the new tag anddev-main.PACKAGIST_USERNAMEand secretPACKAGIST_API_TOKEN(the SAFE token).Test evidence
actionlint: exit 0.python3 -I -m unittest discover -s tests: 20 tests, OK.Release impact
.github: minor (feat:), 2.0.0 → 2.1.0. No existing action changes.Risk and rollback
No repo uses the new action until it adds the job. Rollback: revert this PR.