From 6d36385f0875c645f8d29c712a40b306754b82c8 Mon Sep 17 00:00:00 2001 From: Goooler Date: Wed, 16 Jul 2025 11:42:24 +0800 Subject: [PATCH 1/4] Add create-release.yml --- .github/workflows/create-release.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/create-release.yml diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml new file mode 100644 index 0000000000..7f1c0d1dde --- /dev/null +++ b/.github/workflows/create-release.yml @@ -0,0 +1,18 @@ +name: Create Release +on: + push: + tags: + - '**' + +jobs: + create-github-release: + runs-on: ubuntu-latest + if: github.event.repository.fork == false + steps: + - uses: actions/checkout@v4 + - name: Create GitHub release + run: | + gh release create ${{ github.ref_name }} \ + --title "Create Pull Request ${{ github.ref_name }}" --generate-notes + env: + GITHUB_TOKEN: ${{ secrets.ACTIONS_BOT_TOKEN }} From e5287405ad2a336cbab391cdff35af4033b31f3c Mon Sep 17 00:00:00 2001 From: Goooler Date: Wed, 16 Jul 2025 11:42:59 +0800 Subject: [PATCH 2/4] Test --- .github/workflows/create-release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 7f1c0d1dde..4265ffe8ca 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -7,7 +7,6 @@ on: jobs: create-github-release: runs-on: ubuntu-latest - if: github.event.repository.fork == false steps: - uses: actions/checkout@v4 - name: Create GitHub release @@ -15,4 +14,4 @@ jobs: gh release create ${{ github.ref_name }} \ --title "Create Pull Request ${{ github.ref_name }}" --generate-notes env: - GITHUB_TOKEN: ${{ secrets.ACTIONS_BOT_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From f75277dba88f836cb6d3c14de6faa0e1132bf680 Mon Sep 17 00:00:00 2001 From: Goooler Date: Wed, 16 Jul 2025 11:45:36 +0800 Subject: [PATCH 3/4] Revert "Test" This reverts commit e5287405ad2a336cbab391cdff35af4033b31f3c. --- .github/workflows/create-release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 4265ffe8ca..7f1c0d1dde 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -7,6 +7,7 @@ on: jobs: create-github-release: runs-on: ubuntu-latest + if: github.event.repository.fork == false steps: - uses: actions/checkout@v4 - name: Create GitHub release @@ -14,4 +15,4 @@ jobs: gh release create ${{ github.ref_name }} \ --title "Create Pull Request ${{ github.ref_name }}" --generate-notes env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.ACTIONS_BOT_TOKEN }} From 7650e2556dc50b54bd1a8cffa5fffdcffeab663c Mon Sep 17 00:00:00 2001 From: Goooler Date: Wed, 16 Jul 2025 11:46:34 +0800 Subject: [PATCH 4/4] Add contents write permission --- .github/workflows/create-release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 7f1c0d1dde..7e6fce7479 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -8,6 +8,8 @@ jobs: create-github-release: runs-on: ubuntu-latest if: github.event.repository.fork == false + permissions: + contents: write steps: - uses: actions/checkout@v4 - name: Create GitHub release