File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name: Bump CLI version
22on:
33 workflow_dispatch:
4+ inputs:
5+ option:
6+ description: "Option"
7+ required: true
8+ default: 'replace'
9+ type: choice
10+ options:
11+ - prepend
12+ - replace
13+ version:
14+ description: "Version"
15+ required: false
16+ type: string
417 pull_request:
518 branches: [main]
619 paths:
@@ -23,10 +36,18 @@ jobs:
2336 with:
2437 fetch-depth: 1
2538 - name: Bump CLI
39+ if: ${{ inputs.option == 'replace' }}
2640 env:
2741 GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2842 run: |
2943 scripts/replace-cli-version.sh
44+ - name: Prepend another version
45+ if: ${{ inputs.option == 'prepend' }}
46+ run: |
47+ cat supported_cli_versions.json | jq '. |= ["${{ inputs.version }}"] + .' > supported_cli_versions_temp.json
48+ mv supported_cli_versions_temp.json supported_cli_versions.json
49+ echo "LATEST_VERSION=${{ inputs.version }}" >> $GITHUB_ENV
50+ echo "PREVIOUS_VERSION=`jq -r '.[1]' supported_cli_versions.json`" >> $GITHUB_ENV
3051 - name: Commit, Push and Open a PR
3152 uses: ./.github/actions/create-pr
3253 with:
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments