File tree Expand file tree Collapse file tree 1 file changed +24
-23
lines changed Expand file tree Collapse file tree 1 file changed +24
-23
lines changed Original file line number Diff line number Diff line change 20
20
default : true
21
21
22
22
jobs :
23
- jobA :
23
+ pre :
24
24
name : version
25
25
runs-on : ubuntu-latest
26
- if : github.event.inputs.tag != '' && github.event.inputs.change != ''
27
- steps :
28
- - uses : actions/checkout@v2
29
- - run : |
30
- ls
31
- sed -i "s/\"version\":.*$/\"version\": \"${{ github.event.inputs.tag }}\",/" package.json
32
- echo -e "## version ${{ github.event.inputs.tag }}\n\n- ${{ github.event.inputs.change }}\n\n$(cat CHANGELOG.md)" > CHANGELOG.md
33
- git config user.name ccagml
34
- git config user.email ccagml@163.com
35
- git add .
36
- git commit -m ${{ github.event.inputs.change }}
37
- git push
38
- jobB :
39
- name : createPr
40
- needs : jobA
41
- runs-on : ubuntu-latest
42
26
env :
43
27
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
44
28
GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
45
- if : ${{ github.event.inputs.pr }} && github.event.inputs.tag != ''
46
29
steps :
47
30
- uses : actions/checkout@v2
48
- - run : |
49
- gh pr create -B main --title 'Merge release${{ github.event.inputs.tag }} into main' --body 'Created by Github action'
50
- linux :
51
- name : Linux
52
- needs : jobB
31
+ - name : package_json
32
+ if : github.event.inputs.tag != ''
33
+ run : |
34
+ sed -i "s/\"version\":.*$/\"version\": \"${{ github.event.inputs.tag }}\",/" package.json
35
+ - name : change
36
+ if : github.event.inputs.change != ''
37
+ run : |
38
+ echo -e "## version ${{ github.event.inputs.tag }}\n\n- ${{ github.event.inputs.change }}\n\n$(cat CHANGELOG.md)" > CHANGELOG.md
39
+ - name : commit
40
+ if : github.event.inputs.tag != '' || github.event.inputs.change != ''
41
+ run : |
42
+ git config user.name ccagml
43
+ git config user.email ccagml@163.com
44
+ git add .
45
+ git commit -m ${{ github.event.inputs.change }}
46
+ git push
47
+ - name : finish
48
+ run : |
49
+ ls
50
+
51
+ market :
52
+ name : market
53
+ needs : pre
53
54
runs-on : ubuntu-latest
54
55
timeout-minutes : 30
55
56
if : ${{ github.event.inputs.market }}
You can’t perform that action at this time.
0 commit comments