Skip to content

Commit 82b6087

Browse files
committed
update
1 parent d9a4323 commit 82b6087

File tree

1 file changed

+24
-23
lines changed

1 file changed

+24
-23
lines changed

.github/workflows/release.yml

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,36 +20,37 @@ on:
2020
default: true
2121

2222
jobs:
23-
jobA:
23+
pre:
2424
name: version
2525
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
4226
env:
4327
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4428
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45-
if: ${{ github.event.inputs.pr }} && github.event.inputs.tag != ''
4629
steps:
4730
- 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
5354
runs-on: ubuntu-latest
5455
timeout-minutes: 30
5556
if: ${{ github.event.inputs.market }}

0 commit comments

Comments
 (0)