Skip to content

Commit 83c296e

Browse files
authored
Merge pull request #101 from ccagml/main
update
2 parents 77fe6a7 + 8f4f602 commit 83c296e

File tree

1 file changed

+20
-19
lines changed

1 file changed

+20
-19
lines changed

.github/workflows/release.yml

+20-19
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 != ''
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2729
steps:
2830
- uses: actions/checkout@v2
29-
- run: |
30-
ls
31+
- name: updatepackage
32+
if: github.event.inputs.tag != ''
33+
run: |
3134
sed -i "s/\"version\":.*$/\"version\": \"${{ github.event.inputs.tag }}\",/" package.json
35+
- name: change
36+
if: github.event.inputs.change != ''
37+
run: |
3238
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: |
3342
git config user.name ccagml
3443
git config user.email [email protected]
3544
git add .
3645
git commit -m ${{ github.event.inputs.change }}
3746
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
5354
runs-on: ubuntu-latest
5455
timeout-minutes: 30
5556
if: ${{ github.event.inputs.market }}

0 commit comments

Comments
 (0)