From 82b6087f579f0a195c155eb1dfd874ef2aac30d2 Mon Sep 17 00:00:00 2001 From: ccagml Date: Mon, 12 Dec 2022 17:00:41 +0800 Subject: [PATCH 1/4] update --- .github/workflows/release.yml | 47 ++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 42230d3..dea68e2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,36 +20,37 @@ on: default: true jobs: - jobA: + pre: name: version runs-on: ubuntu-latest - if: github.event.inputs.tag != '' && github.event.inputs.change != '' - steps: - - uses: actions/checkout@v2 - - run: | - ls - sed -i "s/\"version\":.*$/\"version\": \"${{ github.event.inputs.tag }}\",/" package.json - echo -e "## version ${{ github.event.inputs.tag }}\n\n- ${{ github.event.inputs.change }}\n\n$(cat CHANGELOG.md)" > CHANGELOG.md - git config user.name ccagml - git config user.email ccagml@163.com - git add . - git commit -m ${{ github.event.inputs.change }} - git push - jobB: - name: createPr - needs: jobA - runs-on: ubuntu-latest env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: ${{ github.event.inputs.pr }} && github.event.inputs.tag != '' steps: - uses: actions/checkout@v2 - - run: | - gh pr create -B main --title 'Merge release${{ github.event.inputs.tag }} into main' --body 'Created by Github action' - linux: - name: Linux - needs: jobB + - name: package_json + if: github.event.inputs.tag != '' + run: | + sed -i "s/\"version\":.*$/\"version\": \"${{ github.event.inputs.tag }}\",/" package.json + - name: change + if: github.event.inputs.change != '' + run: | + echo -e "## version ${{ github.event.inputs.tag }}\n\n- ${{ github.event.inputs.change }}\n\n$(cat CHANGELOG.md)" > CHANGELOG.md + - name: commit + if: github.event.inputs.tag != '' || github.event.inputs.change != '' + run: | + git config user.name ccagml + git config user.email ccagml@163.com + git add . + git commit -m ${{ github.event.inputs.change }} + git push + - name: finish + run: | + ls + + market: + name: market + needs: pre runs-on: ubuntu-latest timeout-minutes: 30 if: ${{ github.event.inputs.market }} From 9ff1eadea4f9c6f8bf0ed012f564575c27b35054 Mon Sep 17 00:00:00 2001 From: ccagml Date: Mon, 12 Dec 2022 17:02:26 +0800 Subject: [PATCH 2/4] update --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dea68e2..d4bea63 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,7 +28,7 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v2 - - name: package_json + - name: updatepackage if: github.event.inputs.tag != '' run: | sed -i "s/\"version\":.*$/\"version\": \"${{ github.event.inputs.tag }}\",/" package.json From 162bffdf4eb6b364cfcebc95f1f75f7177997b1d Mon Sep 17 00:00:00 2001 From: ccagml Date: Mon, 12 Dec 2022 17:04:08 +0800 Subject: [PATCH 3/4] update --- .github/workflows/release.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d4bea63..a8a6f13 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,16 +29,16 @@ jobs: steps: - uses: actions/checkout@v2 - name: updatepackage - if: github.event.inputs.tag != '' - run: | + if: github.event.inputs.tag != '' + run: | sed -i "s/\"version\":.*$/\"version\": \"${{ github.event.inputs.tag }}\",/" package.json - name: change - if: github.event.inputs.change != '' - run: | + if: github.event.inputs.change != '' + run: | echo -e "## version ${{ github.event.inputs.tag }}\n\n- ${{ github.event.inputs.change }}\n\n$(cat CHANGELOG.md)" > CHANGELOG.md - name: commit - if: github.event.inputs.tag != '' || github.event.inputs.change != '' - run: | + if: github.event.inputs.tag != '' || github.event.inputs.change != '' + run: | git config user.name ccagml git config user.email ccagml@163.com git add . From 8f4f602256682517041339024c710fd0f0e71e7c Mon Sep 17 00:00:00 2001 From: ccagml Date: Mon, 12 Dec 2022 17:05:07 +0800 Subject: [PATCH 4/4] update --- .github/workflows/release.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a8a6f13..b8601b8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,22 +31,22 @@ jobs: - name: updatepackage if: github.event.inputs.tag != '' run: | - sed -i "s/\"version\":.*$/\"version\": \"${{ github.event.inputs.tag }}\",/" package.json + sed -i "s/\"version\":.*$/\"version\": \"${{ github.event.inputs.tag }}\",/" package.json - name: change - if: github.event.inputs.change != '' + if: github.event.inputs.change != '' run: | - echo -e "## version ${{ github.event.inputs.tag }}\n\n- ${{ github.event.inputs.change }}\n\n$(cat CHANGELOG.md)" > CHANGELOG.md + echo -e "## version ${{ github.event.inputs.tag }}\n\n- ${{ github.event.inputs.change }}\n\n$(cat CHANGELOG.md)" > CHANGELOG.md - name: commit if: github.event.inputs.tag != '' || github.event.inputs.change != '' run: | - git config user.name ccagml - git config user.email ccagml@163.com - git add . - git commit -m ${{ github.event.inputs.change }} - git push + git config user.name ccagml + git config user.email ccagml@163.com + git add . + git commit -m ${{ github.event.inputs.change }} + git push - name: finish - run: | - ls + run: | + ls market: name: market