From 47f230d0c2f8c9ef9cb42e8b5447f580e123c053 Mon Sep 17 00:00:00 2001 From: ThePedroo Date: Sun, 16 Jun 2024 21:16:37 -0300 Subject: [PATCH] update: workflows This commit updates the workflows for the repository. --- .github/workflows/ci.yml | 46 ++++----------------------- .github/workflows/issue_moderator.yml | 37 --------------------- 2 files changed, 7 insertions(+), 76 deletions(-) delete mode 100644 .github/workflows/issue_moderator.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d7cf37..53639fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,15 +1,9 @@ name: CI on: - workflow_dispatch: - inputs: - post_telegram: - description: 'Post to Telegram' - required: true - type: boolean push: - branches: [ master ] - tags: [ v* ] + branches: [ main ] + pull_request: merge_group: @@ -29,14 +23,6 @@ jobs: submodules: "recursive" fetch-depth: 0 - - name: Write key - if: ${{ ( github.event_name != 'pull_request' && github.ref == 'refs/heads/master' ) || github.ref_type == 'tag' }} - run: | - if [ ! -z "${{ secrets.PRIVATE_KEY }}" ]; then - echo '${{ secrets.PUBLIC_KEY }}' | base64 --decode > module/public_key - echo '${{ secrets.PRIVATE_KEY }}' | base64 --decode > module/private_key - fi - - name: Setup Java uses: actions/setup-java@v3 with: @@ -84,10 +70,10 @@ jobs: if: success() id: prepareArtifact run: | - releaseName=`ls module/build/outputs/release/Zygisk-Next-v*-release.zip | awk -F '(/|.zip)' '{print $5}'` && echo "releaseName=$releaseName" >> $GITHUB_OUTPUT - debugName=`ls module/build/outputs/release/Zygisk-Next-v*-debug.zip | awk -F '(/|.zip)' '{print $5}'` && echo "debugName=$debugName" >> $GITHUB_OUTPUT - unzip module/build/outputs/release/Zygisk-Next-v*-release.zip -d zksu-release - unzip module/build/outputs/release/Zygisk-Next-v*-debug.zip -d zksu-debug + releaseName=`ls module/build/outputs/release/ReZygisk-v*-release.zip | awk -F '(/|.zip)' '{print $5}'` && echo "releaseName=$releaseName" >> $GITHUB_OUTPUT + debugName=`ls module/build/outputs/release/ReZygisk-v*-debug.zip | awk -F '(/|.zip)' '{print $5}'` && echo "debugName=$debugName" >> $GITHUB_OUTPUT + unzip module/build/outputs/release/ReZygisk-v*-release.zip -d zksu-release + unzip module/build/outputs/release/ReZygisk-v*-debug.zip -d zksu-debug releaseSymbolName="SYMBOLS-$releaseName.zip" debugSymbolName="SYMBOLS-$debugName.zip" echo "releaseSymbolName=$releaseSymbolName" >> $GITHUB_OUTPUT @@ -118,22 +104,4 @@ jobs: with: name: ${{ steps.prepareArtifact.outputs.debugName }}-symbols path: "zygiskd/build/symbols/debug" - - - name: Post to channel - if: ${{ success() && github.event_name != 'pull_request' && github.ref == 'refs/heads/master' && github.ref_type != 'tag' && inputs.post_telegram != 'false' }} - env: - CHANNEL_ID: ${{ secrets.CHANNEL_ID }} - BOT_TOKEN: ${{ secrets.BOT_TOKEN }} - COMMIT_MESSAGE: ${{ github.event.head_commit.message }} - COMMIT_URL: ${{ github.event.head_commit.url }} - COMMIT_ID: ${{ github.event.head_commit.id }} - run: | - if [ ! -z "${{ secrets.BOT_TOKEN }}" ]; then - OUTPUT="module/build/outputs/release" - export Release=$(find $OUTPUT -name "Zygisk-Next-v*-release.zip") - export Debug=$(find $OUTPUT -name "Zygisk-Next-v*-debug.zip") - export ReleaseSymbol="${{ steps.prepareArtifact.outputs.releaseSymbolName }}" - export DebugSymbol="${{ steps.prepareArtifact.outputs.debugSymbolName }}" - URL=$(python3 .github/scripts/telegram_url.py) - curl -v "$URL" -F Release="@$Release" -F Debug="@$Debug" -F ReleaseSymbol="@$ReleaseSymbol" -F DebugSymbol="@$DebugSymbol" - fi + \ No newline at end of file diff --git a/.github/workflows/issue_moderator.yml b/.github/workflows/issue_moderator.yml deleted file mode 100644 index cca9328..0000000 --- a/.github/workflows/issue_moderator.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Issue moderator - -on: - issues: - types: [opened, edited, reopened] - -jobs: - autoclose: - runs-on: ubuntu-latest - steps: - - name: Check no title issue - uses: tachiyomiorg/issue-moderator-action@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - auto-close-rules: | - [ - { - "type": "title", - "regex": ".*(Short description|简单描述).*", - "message": "You did not fill out the description in the title/你没有填写标题" - } - ] - auto-close-ignore-label: do-not-autoclose - - name: Check version issue - uses: tachiyomiorg/issue-moderator-action@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - auto-close-rules: | - [ - { - "type": "body", - "regex": ".*(version is too old|version too old|太旧|过旧).*", - "message": "Upgrade your KernelSU / 升级 KernelSU" - } - ] - auto-close-ignore-label: do-not-autoclose -