@@ -15,12 +15,13 @@ jobs:
15
15
- name : Prepare ch.txt content
16
16
id : prepare_ch
17
17
run : |
18
- git checkout test_ci
18
+ cur_branch = "${{ github.ref_name }}"
19
+ git checkout $cur_branch
19
20
git remote add upstream https://github.com/chatty/chatty
20
21
git fetch --all
21
- git branch test_ci --set-upstream-to upstream/master
22
- status_output=$(git status )
23
- echo "::set-output name= CH_CONTENT:: $status_output"
22
+ git branch $cur_branch --set-upstream-to upstream/master
23
+ status_output=$(git rev-list --count upstream/master..origin/${cur_branch} )
24
+ echo "CH_CONTENT= $status_output" >> $GITHUB_OUTPUT
24
25
25
26
build :
26
27
needs : prepare
42
43
distribution : ' adopt'
43
44
java-version : ' 17'
44
45
45
- - name : Create ch.txt and run version.py
46
+ - name : Run version.py
46
47
run : |
47
- echo "${{ needs.prepare.outputs.ch_content }}" > ch.txt
48
- python version.py
48
+ python version.py "${{ needs.prepare.outputs.ch_content }}"
49
49
50
50
- name : Build with Gradle
51
51
run : |
67
67
id : set_version
68
68
run : |
69
69
set /p new_tag_text=<final_version.txt
70
- echo "::set-output name= NEW_TAG_TEXT:: %new_tag_text%"
70
+ echo "NEW_TAG_TEXT= %new_tag_text%" >> $GITHUB_OUTPUT
71
71
72
72
build_mac_arm :
73
73
needs : prepare
87
87
java-version : ' 17'
88
88
architecture : arm64
89
89
90
- - name : Create ch.txt and run version.py
90
+ - name : Run version.py
91
91
run : |
92
- echo "${{ needs.prepare.outputs.ch_content }}" > ch.txt
93
- python version.py
92
+ python version.py "${{ needs.prepare.outputs.ch_content }}"
94
93
95
94
- name : Build with Gradle (ARM64)
96
95
run : |
@@ -122,10 +121,9 @@ jobs:
122
121
java-version : ' 17'
123
122
architecture : x64
124
123
125
- - name : Create ch.txt and run version.py
124
+ - name : Run version.py
126
125
run : |
127
- echo "${{ needs.prepare.outputs.ch_content }}" > ch.txt
128
- python version.py
126
+ python version.py "${{ needs.prepare.outputs.ch_content }}"
129
127
130
128
- name : Build with Gradle (x64)
131
129
run : |
0 commit comments