Skip to content

#feat: Made highcharts optional + refactoring #9

#feat: Made highcharts optional + refactoring

#feat: Made highcharts optional + refactoring #9

Workflow file for this run

name: "Bump version"
on:
pull_request:
branches:
- v2
types:
- closed
jobs:
bump-version:
name: Bump version depending on labels
runs-on: ubuntu-latest
if: |
github.event.pull_request.merged == true && (
contains(github.event.pull_request.labels.*.name, 'patch') ||
contains(github.event.pull_request.labels.*.name, 'minor') )
steps:
- name: Checkout branch
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: "16"
- name: Bump version
run: |
IFS=',' read -r -a label_array <<< "${{ join(github.event.pull_request.labels.*.name, ',') }}"
if [[ "${label_array[*]}" =~ "minor" ]]; then
yarn version --minor --no-git-tag-version
elif [[ "${label_array[*]}" =~ "patch" ]]; then
yarn version --patch --no-git-tag-version
else
echo "No version bump needed"
fi
- name: Install dependencies
run: yarn
- name: Generate builds
run: yarn build
- name: Get the new version
id: get_version
run: echo "::set-output name=version::$(node -p "require('./package.json').version")"
- name: Commit and push changes
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git add package.json dist/
git commit -m "Bump version to ${{ steps.get_version.outputs.version }}"
git push origin HEAD:v2