Skip to content

Commit 7930613

Browse files
committed
update
1 parent cd750b9 commit 7930613

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/release.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ on:
1010
change:
1111
description: "提交内容"
1212
type: string
13+
pr:
14+
description: "需要合并提交"
15+
type: boolean
16+
default: true
17+
market:
18+
description: "提交到市场"
19+
type: boolean
20+
default: true
1321

1422
jobs:
1523
jobA:
@@ -27,10 +35,22 @@ jobs:
2735
git add .
2836
git commit -m ${{ github.event.inputs.change }}
2937
git push
38+
jobB:
39+
name: createPr
40+
runs-on: ubuntu-latest
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
if: ${{ github.event.inputs.pr }} && github.event.inputs.tag != ''
45+
steps:
46+
- uses: actions/checkout@v2
47+
- run: |
48+
gh pr create -B main --title 'Merge release${{ github.event.inputs.tag }} into main' --body 'Created by Github action'
3049
linux:
3150
name: Linux
3251
runs-on: ubuntu-latest
3352
timeout-minutes: 30
53+
if: ${{ github.event.inputs.market }}
3454
steps:
3555
- uses: actions/checkout@v2
3656

0 commit comments

Comments
 (0)