From 3c7897e4201d076cf9e5e5c7fd449e157a7e2e7a Mon Sep 17 00:00:00 2001 From: Luozf12345 <2515187986@qq.com> Date: Wed, 13 Mar 2024 20:24:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=B7=A5=E4=BD=9C=E6=B5=81ym?= =?UTF-8?q?l=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/auto-release.yml | 94 ------------------------------ .github/workflows/test.yml | 30 ---------- 2 files changed, 124 deletions(-) delete mode 100644 .github/workflows/auto-release.yml delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml deleted file mode 100644 index 75d140b08..000000000 --- a/.github/workflows/auto-release.yml +++ /dev/null @@ -1,94 +0,0 @@ -name: Auto Release - -on: - pull_request: - branches: [develop, feature/actions, main] - types: [opened, synchronize, reopened, closed] -# paths: -# - "package.json" - push: - branches: [develop, feature/auto-release] -# types: [opened, synchronize, reopened, closed] -# paths: -# - "package.json" -# issue_comment: -# types: [edited] - -jobs: -# generator: -# runs-on: ubuntu-latest -# if: > -# github.event_name == 'pull_request' && -# github.event.pull_request.merged == false && -# startsWith(github.head_ref, 'release/') -# steps: -# - run: echo "The head of this PR starts with 'release/'" -# - uses: actions/checkout@v3 -# - uses: 94dreamer/auto-release@develop -# id: changelog -# env: -# GITHUB_TOKEN: ${{ secrets.TD_FLUTTER }} -# - name: Add comment -# uses: peter-evans/create-or-update-comment@v1 -# with: -# issue-number: ${{ github.event.pull_request.number }} -# body: | -# ${{ steps.changelog.outputs.changelog }} - comment_add_log: - runs-on: ubuntu-latest -# if: > -# github.event_name == 'issue_comment' -# && github.event.issue.pull_request -# && github.event.sender.login == github.event.issue.user.login -# && startsWith(github.event.comment.body, '## 🌈 ') - steps: - - id: comment - shell: bash - run: | - result=$(curl ${{github.event.issue.pull_request.url}} -H "Authorization: token ${{ secrets.TD_FLUTTER }}") - headrefreg='"ref": "(release/[[:digit:]]{1,2}\.[[:digit:]]{1,2}\.[[:digit:]]{1,2})",' - if [[ $result =~ $headrefreg ]] - then - echo "属于 release pr 的 comment ${BASH_REMATCH[1]}" - else - echo "不属于 release pr 的 comment" && exit 1 - fi - echo "::set-output name=branch::${BASH_REMATCH[1]}" - # zsh $match[1] - - uses: actions/checkout@v3 - with: - ref: ${{ steps.comment.outputs.branch }} - - name: Commit and push if needed - env: - BODY: ${{ github.event.comment.body }} - run: | - txt=$(cat CHANGELOG.md) - echo "${txt%%##*}$BODY${txt##*---}" > CHANGELOG.md - git add . - git config --local user.email "github-actions[bot]@users.noreply.github.com" - git config --local user.name "github-actions[bot]" - git commit -m "chore: changelog's changes" - git push - echo "💾 pushed changelog's changes" -# merge_tag: -# runs-on: ubuntu-latest -# if: > -# github.event_name == 'pull_request' && -# github.event.pull_request.merged == true && -# startsWith(github.head_ref, 'release/') -# steps: -# - uses: actions/checkout@v3 -# with: -# ref: develop -# token: ${{ secrets.PERSONAL_TOKEN }} -# - name: tag and push if needed -# run: | -# data=$(cat package.json) -# re="\"version\": \"([^\"]*)\"" -# [[ $data =~ $re ]] -# echo "${BASH_REMATCH[1]}" -# git config --local user.email "github-actions[bot]@users.noreply.github.com" -# git config --local user.name "github-actions[bot]" -# git tag ${BASH_REMATCH[1]} -# git push origin ${BASH_REMATCH[1]} -# echo "pushed tag ${BASH_REMATCH[1]}" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index bfba42b19..000000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,30 +0,0 @@ - -name: Push Test -on: - push: - branches: [develop, feature/actions, main] - -jobs: - my-job: - name: My Job - runs-on: ubuntu-latest - steps: - - name: Print a greeting - env: - MY_VAR: Hi there! My name is - FIRST_NAME: Luozf - MIDDLE_NAME: The - LAST_NAME: 12345 - shell: bash - run: | - echo ${{github.event.commits}} - echo "push 事件执行完成" -# result=$(curl ${{github.event.issue.pull_request.url}} -H "Authorization: token ${{ secrets.TD_FLUTTER }}") -# headrefreg='"ref": "(release/[[:digit:]]{1,2}\.[[:digit:]]{1,2}\.[[:digit:]]{1,2})",' -# if [[ $result =~ $headrefreg ]] -# then -# echo "属于 release pr 的 comment ${BASH_REMATCH[1]}" -# else -# echo "不属于 release pr 的 comment" && exit 1 -# fi -# echo "::set-output name=branch::${BASH_REMATCH[1]}"