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 : |
15+ The version to prepend to the supported versions file. This should be in the form: `vA.B.C`.
16+ required : false
17+ type : string
418 pull_request :
519 branches : [main]
620 paths :
@@ -23,10 +37,18 @@ jobs:
2337 with :
2438 fetch-depth : 1
2539 - name : Bump CLI
40+ if : ${{ inputs.option == 'replace' }}
2641 env :
2742 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2843 run : |
2944 scripts/replace-cli-version.sh
45+ - name : Prepend another version
46+ if : ${{ inputs.option == 'prepend' }}
47+ run : |
48+ cat supported_cli_versions.json | jq '. |= ["${{ inputs.version }}"] + .' > supported_cli_versions_temp.json
49+ mv supported_cli_versions_temp.json supported_cli_versions.json
50+ echo "LATEST_VERSION=${{ inputs.version }}" >> $GITHUB_ENV
51+ echo "PREVIOUS_VERSION=`jq -r '.[1]' supported_cli_versions.json`" >> $GITHUB_ENV
3052 - name : Commit, Push and Open a PR
3153 uses : ./.github/actions/create-pr
3254 with :
You can’t perform that action at this time.
0 commit comments