update_bpmn_visualization_version #18
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
name: Update the version of the bpmn-visualization TypeScript library | |
on: | |
repository_dispatch: | |
types: [ update_bpmn_visualization_version ] | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Version' | |
required: true | |
jobs: | |
updateVersion: | |
runs-on: ubuntu-22.04 | |
env: | |
VERSION: ${{ github.event.client_payload.version || github.event.inputs.version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get the old version of bpmn-visualization | |
id: lookupOldBPMNVisuVersion | |
uses: mikefarah/yq@v4 | |
with: | |
cmd: yq '.dependencies[] | select(.name == "bpmn-visualization") | .version' inst/htmlwidgets/bpmnVisualizationR.yaml | |
- run: echo "OLD_VERSION=${{ steps.lookupOldBPMNVisuVersion.outputs.result }}" >> $GITHUB_ENV | |
- name: Delete the old bpmn-visualization | |
run: rm inst/htmlwidgets/lib/bpmn-visualization/bpmn-visualization.min.js | |
- name: Download bpmn-visualization@${{ env.VERSION }} | |
uses: carlosperate/download-file-action@v2 | |
with: | |
file-url: 'https://cdn.jsdelivr.net/npm/bpmn-visualization@${{ env.VERSION }}/dist/bpmn-visualization.min.js' | |
location: 'inst/htmlwidgets/lib/bpmn-visualization' | |
- name: Update the bpmn-visualization version in the YAML file | |
run: | | |
sed -i -E 's/version: ".*"/version: "${{ env.VERSION }}"/' inst/htmlwidgets/bpmnVisualizationR.yaml | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
token: ${{ secrets.GH_RELEASE_TOKEN }} | |
commit-message: "chore(deps): bump bpmn-visualization from ${{ env.OLD_VERSION }} to ${{ env.VERSION }}" | |
committer: "process-analytics-bot <[email protected]>" | |
author: "process-analytics-bot <[email protected]>" | |
branch: "chore/bump_bpmn_visualization_from_${{ env.OLD_VERSION }}_to_${{ env.VERSION }}" | |
delete-branch: true | |
base: "main" | |
title: "chore(deps): bump bpmn-visualization from ${{ env.OLD_VERSION }} to ${{ env.VERSION }}" | |
body: "bpmn-visualization is updated from https://cdn.jsdelivr.net/npm/bpmn-visualization@${{ env.VERSION }}/dist/bpmn-visualization.min.js." | |
labels: "dependencies" | |
team-reviewers: pa-collaborators | |
draft: true |