Skip to content

NPM bump version

NPM bump version #12

name: NPM bump version
on:
workflow_dispatch:
inputs:
version:
description: 'Semver type of new version (major / minor / patch)'
required: true
type: choice
options:
- patch
- minor
- major
jobs:
bump-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
- name: Setup environment
uses: actions/setup-node@v2.5.1
with:
node-version: '16'
cache: 'yarn'
- name: Install dependencies
run: yarn install --immutable
- name: Build package
run: yarn build
- name: Run tests
run: yarn test
- name: Setup Git
run: |
git config user.name 'grafanabot'
git config user.email 'bot@grafana.com'
- name: bump version
run: npm version ${{ github.event.inputs.version }}
- name: Push latest version
run: git push origin main --follow-tags