-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: simulate "trigger workflows when new version available on npm" (#…
…373) This simulates what we are achieving in the `bpmn-visualization` repository. Introduce a workflow that sends a repository-dispatch event which triggers the workflow that builds the bpmn-visualization demo for the repository of examples. Additional refactoring - simplify the retrieval of inputs of a workflow_dispatch - bump peter-evans/repository-dispatch from v2 to v3 (mainly to enforce run with Node20) in the shared action
- Loading branch information
Showing
8 changed files
with
44 additions
and
20 deletions.
There are no files selected for viewing
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
22 changes: 22 additions & 0 deletions
22
.github/workflows/post-release-simulate-new-version-available-on-npm.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# in bpmn-visualization, the repository_dispatch event is sent after the npm publish is done | ||
# here, to ease the testing, this is done in a dedicated workflow triggered manually | ||
name: Simulate the availability of a new version of an npm package | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version' | ||
required: true | ||
|
||
jobs: | ||
notify: | ||
runs-on: ${{ vars.RUNNER_UBUNTU }} | ||
permissions: | ||
contents: write # to dispatch event | ||
steps: | ||
- name: Send Repository Dispatch event | ||
uses: peter-evans/repository-dispatch@v3 | ||
with: | ||
# use the default GITHUB_TOKEN, this is possible because we are dispatching the same repository | ||
event-type: new_version_available_on_npm | ||
client-payload: "{ version: ${{ inputs.version }} }" |
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
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
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
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
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
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