Skip to content

Commit d73d37f

Browse files
authored
Merge pull request #98 from ccagml/main
release action
2 parents c33595e + 7930613 commit d73d37f

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-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

.github/workflows/update_version.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
change:
1010
description: "提交内容"
1111
type: string
12+
pr:
13+
description: "需要合并提交"
14+
type: boolean
15+
default: false
1216

1317
jobs:
1418
jobA:
@@ -26,3 +30,14 @@ jobs:
2630
git add .
2731
git commit -m ${{ github.event.inputs.change }}
2832
git push
33+
jobB:
34+
name: createPr
35+
runs-on: ubuntu-latest
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
if: ${{ github.event.inputs.pr }} && github.event.inputs.tag != ''
40+
steps:
41+
- uses: actions/checkout@v2
42+
- run: |
43+
gh pr create -B main --title 'Merge release${{ github.event.inputs.tag }} into main' --body 'Created by Github action'

0 commit comments

Comments
 (0)