From 5bc95b7a8af38eb6cb8e291367ec96f5287dbd6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Wed, 7 Aug 2024 23:15:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4=20Github=20=E5=B7=A5?= =?UTF-8?q?=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/{clear-releases.py => clear-github-releases.py} | 1 - .github/{clear-tags.cmd => clear-github-tags.cmd} | 0 .github/release.sh | 6 ------ .github/workflows/clear.yml | 6 +++--- .github/workflows/split.yml | 4 +++- 5 files changed, 6 insertions(+), 11 deletions(-) rename .github/{clear-releases.py => clear-github-releases.py} (99%) rename .github/{clear-tags.cmd => clear-github-tags.cmd} (100%) diff --git a/.github/clear-releases.py b/.github/clear-github-releases.py similarity index 99% rename from .github/clear-releases.py rename to .github/clear-github-releases.py index 3ade0aa76..aed5047c7 100644 --- a/.github/clear-releases.py +++ b/.github/clear-github-releases.py @@ -15,7 +15,6 @@ def main(): owner = os.getenv("GITHUB_REPOSITORY").split('/')[0] # 获取仓库所有者 g = Github(token) repo = g.get_repo(f"{owner}/{repo_name}") - delete_all_releases(repo) if __name__ == "__main__": diff --git a/.github/clear-tags.cmd b/.github/clear-github-tags.cmd similarity index 100% rename from .github/clear-tags.cmd rename to .github/clear-github-tags.cmd diff --git a/.github/release.sh b/.github/release.sh index 99b39fb5d..e07d7c104 100644 --- a/.github/release.sh +++ b/.github/release.sh @@ -11,12 +11,6 @@ CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) VERSION=$1 BASEPATH=$(cd `dirname $0`; cd ../plugin/; pwd) -# Always prepend with "v" -#if [[ $VERSION != v* ]] -#then -# VERSION="v$VERSION" -#fi - if [ -z $2 ] ; then repos=$(ls $BASEPATH) else diff --git a/.github/workflows/clear.yml b/.github/workflows/clear.yml index 3e035040a..ad29ae71a 100644 --- a/.github/workflows/clear.yml +++ b/.github/workflows/clear.yml @@ -1,4 +1,4 @@ -name: Clear Release +name: Clear Releases on: workflow_dispatch: @@ -20,6 +20,6 @@ jobs: - name: Delete tags and releases env: - GITHUB_TOKEN: ${{ secrets.TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - python .github/clear-releases.py \ No newline at end of file + python .github/clear-github-releases.py \ No newline at end of file diff --git a/.github/workflows/split.yml b/.github/workflows/split.yml index 4729b8a34..db73db412 100644 --- a/.github/workflows/split.yml +++ b/.github/workflows/split.yml @@ -1,4 +1,4 @@ -name: Split Repos +name: Split Repositorys on: [ workflow_dispatch ] @@ -13,12 +13,14 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Setup Private Key run: | mkdir -p ~/.ssh echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa chmod 600 ~/.ssh/id_rsa echo "StrictHostKeyChecking no" >> ~/.ssh/config + - name: Split And Push run: | git config pull.rebase true