@@ -32,13 +32,16 @@ jobs:
3232 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
3333
3434 # changesets action outputs `publishedPackages` in the format
35- # [{"name": "@xx/xx", "version": "1.2.0"}, {"name": "@xx/xy", "version": "0.8.9"}]
35+ # [{"name": "@xx/xx", "version": "1.2.0"}, {"name": "@xx/xy", "version": "0.8.9"}]
3636 # The following step converts that list of objects to a list of strings (git tags for github releases)
37- 38- - id : get-tags
37+ # and joins them with commas, for consumption in the next step
38+ 39+ - name : Transform Tags
40+ id : get-tags
3941 if : ${{ steps.changesets.outputs.published == 'true' }}
4042 run : |
4143 tags=$( echo '${{ steps.changesets.outputs.publishedPackages }}' | jq -c 'map([.name,.version]) | map(join("@")) | join(", ")' )
44+ echo "$tags"
4245 echo "::set-output name=tags::$tags"
4346
4447 - name : Bundle
@@ -49,14 +52,20 @@ jobs:
4952 debug : ${{ secrets.ACTIONS_RUNNER_DEBUG }}
5053 github-token : ${{ secrets.GITHUB_TOKEN }}
5154 script : |
52- await github.rest.actions.createWorkflowDispatch({
53- owner: 'patternfly',
54- repo: 'patternfly-elements',
55- workflow_id: 'bundle.yml',
56- ref: 'main',
57- inputs: {
58- tags: '${{ steps.get-tags.outputs.tags }}'
59- },
60- });
55+ try {
56+ const result = await github.rest.actions.createWorkflowDispatch({
57+ owner: 'patternfly',
58+ repo: 'patternfly-elements',
59+ workflow_id: 'bundle.yml',
60+ ref: 'main',
61+ inputs: {
62+ tags: '${{ steps.get-tags.outputs.tags }}'
63+ },
64+ })
65+ console.log(result);
66+ } catch(error) {
67+ console.error(error);
68+ core.setFailed(error);
69+ }
6170
6271
0 commit comments