name: Bump version on: workflow_dispatch: inputs: version: description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch, major.minor.patch-preview or major.minor.patch-preview format. example: 7.4.3, 7.4.3-preview or 7.4.3-preview1' required: true push: default: true required: false dry_run: default: false required: false permissions: contents: write pull-requests: write jobs: bump-version: runs-on: ubuntu-latest steps: - name: Checkout Grafana uses: actions/checkout@v4 with: persist-credentials: false - name: Update package.json versions uses: ./pkg/build/actions/bump-version with: version: ${{ inputs.version }} - if: ${{ inputs.push }} name: Push & Create PR env: VERSION: ${{ inputs.version }} DRY_RUN: ${{ inputs.dry_run }} REF_NAME: ${{ github.ref_name }} RUN_ID: ${{ github.run_id }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | git config --local user.name "github-actions[bot]" git config --local user.email "github-actions[bot]@users.noreply.github.com" git config --local --add --bool push.autoSetupRemote true git checkout -b "bump-version/${RUN_ID}/${VERSION}" git add . git commit -m "bump version ${VERSION}" git push gh pr create --dry-run=$DRY_RUN -l "type/ci" -l "no-changelog" -B "$REF_NAME" --title "Release: Bump version to ${VERSION}" --body "Updated version to ${VERSION}"