From 52549c3ec1378ba7f68ed8f317420657b9b6a5b6 Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Fri, 17 May 2024 17:27:51 +0800 Subject: [PATCH 1/4] chore: fix semantic-release on GitHub protected tags --- .github/workflows/ci.yml | 6 ++---- package.json | 3 +++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e5c56438..ba018dd5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,7 @@ on: push: branches: - main + - xuan.hu/checkout-persistent concurrency: cancel-in-progress: true @@ -84,15 +85,12 @@ jobs: name: Semantic Release runs-on: ubuntu-22.04 # Avoid semantic release for forked repository - if: github.event_name != 'pull_request' && github.repository == 'serious-scaffold/ss-python' + if: github.event_name != 'pull_request' && github.repository == 'huxuan/ss-python' permissions: contents: write id-token: write issues: write pull-requests: write - needs: - - ci - - consistency steps: - id: generate-token name: Generate a token with GitHub App if App ID exists diff --git a/package.json b/package.json index 71a24212..ef7fc688 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,9 @@ ] }, "release": { + "branches": [ + "xuan.hu/checkout-persistent" + ], "plugins": [ [ "@semantic-release/commit-analyzer", From 4caa614cd65c4561033347545ddcbfb8b21ddb24 Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Fri, 17 May 2024 23:36:33 +0800 Subject: [PATCH 2/4] test: try fix --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ba018dd5..90dc49fd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -108,6 +108,7 @@ jobs: - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 with: fetch-depth: 0 + persist-credentials: false - name: Setup Node.js uses: actions/setup-node@v4.0.2 with: From a9d44c74ac5a7628e1290b66db4a89ee5a5d0c5d Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Fri, 17 May 2024 23:37:51 +0800 Subject: [PATCH 3/4] Revert "chore: fix semantic-release on GitHub protected tags" This reverts commit 52549c3ec1378ba7f68ed8f317420657b9b6a5b6. --- .github/workflows/ci.yml | 6 ++++-- package.json | 3 --- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 90dc49fd..5acd6c5f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,6 @@ on: push: branches: - main - - xuan.hu/checkout-persistent concurrency: cancel-in-progress: true @@ -85,12 +84,15 @@ jobs: name: Semantic Release runs-on: ubuntu-22.04 # Avoid semantic release for forked repository - if: github.event_name != 'pull_request' && github.repository == 'huxuan/ss-python' + if: github.event_name != 'pull_request' && github.repository == 'serious-scaffold/ss-python' permissions: contents: write id-token: write issues: write pull-requests: write + needs: + - ci + - consistency steps: - id: generate-token name: Generate a token with GitHub App if App ID exists diff --git a/package.json b/package.json index ef7fc688..71a24212 100644 --- a/package.json +++ b/package.json @@ -5,9 +5,6 @@ ] }, "release": { - "branches": [ - "xuan.hu/checkout-persistent" - ], "plugins": [ [ "@semantic-release/commit-analyzer", From be708ec8b17ea8a56d51d2808c462cda6f0030fe Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Fri, 17 May 2024 23:38:51 +0800 Subject: [PATCH 4/4] update template --- .../workflows/ci.yml.jinja | 1 + 1 file changed, 1 insertion(+) diff --git a/template/[% if repo_platform == 'github' %].github[% endif %]/workflows/ci.yml.jinja b/template/[% if repo_platform == 'github' %].github[% endif %]/workflows/ci.yml.jinja index 023c55a8..d27a536e 100644 --- a/template/[% if repo_platform == 'github' %].github[% endif %]/workflows/ci.yml.jinja +++ b/template/[% if repo_platform == 'github' %].github[% endif %]/workflows/ci.yml.jinja @@ -141,6 +141,7 @@ jobs: - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 with: fetch-depth: 0 + persist-credentials: false - name: Setup Node.js uses: actions/setup-node@v4.0.2 with: