-
-
Notifications
You must be signed in to change notification settings - Fork 518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: publish preview versions #2335
Merged
Merged
Conversation
This file contains 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
Member
kettanaito
commented
Oct 27, 2024
- Adds a new workflow to publish MSW from approved pull requests using https://github.com/stackblitz-labs/pkg.pr.new.
- Adds a new workflow to automatically lock closed issues.
- Updates actions versions in the workflows.
yannbf
previously approved these changes
Oct 27, 2024
yannbf
previously approved these changes
Oct 27, 2024
commit: |
dandelionadia
approved these changes
Oct 27, 2024
dandelionadia
approved these changes
Oct 27, 2024
yannbf
previously approved these changes
Oct 27, 2024
dandelionadia
approved these changes
Oct 27, 2024
kettanaito
force-pushed
the
chore/package-previews
branch
from
October 27, 2024 13:49
0eda488
to
131ee0e
Compare
dandelionadia
approved these changes
Oct 27, 2024
kettanaito
force-pushed
the
chore/package-previews
branch
from
October 27, 2024 13:52
131ee0e
to
80a5287
Compare
dandelionadia
approved these changes
Oct 27, 2024
kettanaito
force-pushed
the
chore/package-previews
branch
from
October 27, 2024 13:58
80a5287
to
50edf37
Compare
dandelionadia
approved these changes
Oct 27, 2024
merrywald-fitzgerald
approved these changes
Oct 27, 2024
kettanaito
commented
Oct 27, 2024
# trigger preview package publishing. | ||
if: github.event.review.state == 'approved' | ||
runs-on: ubuntu-latest | ||
outputs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setup
The trick to a finally properly working setup was:
- Has 2 separate jobs: one checks for permissions, the other publishes the preview;
- The check job shares its outputs via
outputs
. It references the used action output based on the user's permissions. The job itself never fails because then the entire PR status will be failed, which isn't nice; - The preview job
needs
the check job BUT also needs a customif
condition since the check job won't ever fail (even if it's skipped, GitHub still treats the job status assuccess
). In theif
, the preview job can check the sharedoutputs
from the permissions check, and publish the preview only if the output is'true'
.
Released: v2.6.0 🎉This has been released in v2.6.0! Make sure to always update to the latest version ( Predictable release automation by @ossjs/release. |
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.