2
2
name : " Update version in package.json"
3
3
4
4
on :
5
- push :
6
- # workflow_dispatch:
7
- # inputs:
8
- # version:
9
- # description: 'Version to update to (e.g. 1.20.0)'
10
- # required: true
5
+ workflow_dispatch :
6
+ inputs :
7
+ version :
8
+ description : ' Version to update to (e.g. 1.20.0)'
9
+ required : true
11
10
12
11
jobs :
13
12
update :
29
28
exit 1
30
29
fi
31
30
32
- - name : Echo SdkVersionHelper
33
- run : echo "$(cat ./src/Packages/Passport/Runtime/Scripts/Private/Helpers/SdkVersionInfoHelpers.cs)"
34
-
35
31
- name : Set up Python
36
32
uses : actions/setup-python@v4
37
33
with :
@@ -40,26 +36,26 @@ jobs:
40
36
- name : Install jq
41
37
run : sudo apt-get install -y jq
42
38
43
- # - name: Replace version string
44
- # id: replace_version
45
- # run: |
46
- # FILE=./src/Packages/Passport/package.json
47
- # VERSION=${{ github.event.inputs.version }}
48
- # jq --arg version "$VERSION" '.version = $version' $FILE > tmp.$$.json && mv tmp.$$.json $FILE
39
+ - name : Replace version string
40
+ id : replace_version
41
+ run : |
42
+ FILE=./src/Packages/Passport/package.json
43
+ VERSION=${{ github.event.inputs.version }}
44
+ jq --arg version "$VERSION" '.version = $version' $FILE > tmp.$$.json && mv tmp.$$.json $FILE
49
45
50
- # - name: Replace engine sdk version string
51
- # id: replace_engine_sdk_version
52
- # run: |
53
- # FILE=./src/Packages/Passport/Runtime/Scripts/Private/Helpers/SdkVersionInfoHelpers.cs
54
- # VERSION=${{ github.event.inputs.version }}
55
- # sed -i -E "s/[0-9]+\.[0-9]+\.[0-9]+/$VERSION/g" $FILE
46
+ - name : Replace engine sdk version string
47
+ id : replace_engine_sdk_version
48
+ run : |
49
+ FILE=./src/Packages/Passport/Runtime/Scripts/Private/Helpers/SdkVersionInfoHelpers.cs
50
+ VERSION=${{ github.event.inputs.version }}
51
+ sed -i -E "s/[0-9]+\.[0-9]+\.[0-9]+/$VERSION/g" $FILE
56
52
57
- # - uses: gr2m/create-or-update-pull-request-action@v1
58
- # env:
59
- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60
- # with:
61
- # title: "release: update version"
62
- # body: "Update version in package.json"
63
- # branch: "release/update-version"
64
- # commit-message: "release: update version"
65
- # labels: release
53
+ - uses : gr2m/create-or-update-pull-request-action@v1
54
+ env :
55
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
56
+ with :
57
+ title : " release: update version"
58
+ body : " Update version in package.json"
59
+ branch : " release/update-version"
60
+ commit-message : " release: update version"
61
+ labels : release
0 commit comments