File tree 1 file changed +20
-19
lines changed
1 file changed +20
-19
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 != ''
26
+ env :
27
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
28
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
27
29
steps :
28
30
- uses : actions/checkout@v2
29
- - run : |
30
- ls
31
+ - name : updatepackage
32
+ if : github.event.inputs.tag != ''
33
+ run : |
31
34
sed -i "s/\"version\":.*$/\"version\": \"${{ github.event.inputs.tag }}\",/" package.json
35
+ - name : change
36
+ if : github.event.inputs.change != ''
37
+ run : |
32
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 : |
33
42
git config user.name ccagml
34
43
git config user.email [email protected]
35
44
git add .
36
45
git commit -m ${{ github.event.inputs.change }}
37
46
git push
38
- jobB :
39
- name : createPr
40
- needs : jobA
41
- runs-on : ubuntu-latest
42
- env :
43
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
44
- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
45
- if : ${{ github.event.inputs.pr }} && github.event.inputs.tag != ''
46
- steps :
47
- - 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
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