File tree Expand file tree Collapse file tree 2 files changed +36
-2
lines changed Expand file tree Collapse file tree 2 files changed +36
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : Update Main Version
2
+ run-name : Move ${{ github.event.inputs.major_version }} to ${{ github.event.inputs.target }}
3
+
4
+ # Taken from `actions/checkout` repo under MIT License:
5
+ # https://github.com/actions/checkout/blob/v4.1.7/.github/workflows/update-main-version.yml
6
+
7
+ on :
8
+ workflow_dispatch :
9
+ inputs :
10
+ target :
11
+ description : The tag or reference to use
12
+ required : true
13
+ major_version :
14
+ type : choice
15
+ description : The major version to update
16
+ options :
17
+ - v2
18
+ - v1
19
+
20
+ jobs :
21
+ tag :
22
+ runs-on : ubuntu-latest
23
+ steps :
24
+ - uses : actions/checkout@v4
25
+ with :
26
+ fetch-depth : 0
27
+ - name : Git config
28
+ run : |
29
+ git config user.name "github-actions[bot]"
30
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
31
+ - name : Tag new target
32
+ run : git tag -f ${{ github.event.inputs.major_version }} ${{ github.event.inputs.target }}
33
+ - name : Push new tag
34
+ run : git push origin ${{ github.event.inputs.major_version }} --force
Original file line number Diff line number Diff line change 27
27
shell : bash
28
28
- name : Cache monorepo node_modules
29
29
if : ${{ !fromJSON(inputs.skip-cache) && fromJSON(inputs.is-monorepo) }}
30
- uses : actions/cache@v3
30
+ uses : actions/cache@v4
31
31
with :
32
32
path : " **/node_modules/"
33
33
key : ${{ steps.output-os-version.outputs.version }}-node${{ steps.output-node-version.outputs.version }}-yarn-${{ hashFiles('**/yarn.lock') }}
36
36
37
37
- name : Cache single-repo node_modules
38
38
if : ${{ !fromJSON(inputs.skip-cache) && !fromJSON(inputs.is-monorepo) }}
39
- uses : actions/cache@v3
39
+ uses : actions/cache@v4
40
40
with :
41
41
path : " node_modules/"
42
42
key : ${{ steps.output-os-version.outputs.version }}-node${{ steps.output-node-version.outputs.version }}-yarn-${{ hashFiles('yarn.lock') }}
You can’t perform that action at this time.
0 commit comments