From de19c1f5d9c8d0938e97925045f6de41470d5613 Mon Sep 17 00:00:00 2001 From: MuZhou233 Date: Fri, 12 Jul 2024 12:42:39 +0100 Subject: [PATCH 1/2] fix: update ci configs (cherry picked from commit 11445aab1a31c9ee2b3440f4ea08c94043be6004) --- .github/workflows/PerformancePush.yml | 40 --------------------------- .github/workflows/build.yml | 18 +++++++++--- Makefile | 5 ---- 3 files changed, 14 insertions(+), 49 deletions(-) delete mode 100644 .github/workflows/PerformancePush.yml diff --git a/.github/workflows/PerformancePush.yml b/.github/workflows/PerformancePush.yml deleted file mode 100644 index e78cb6b..0000000 --- a/.github/workflows/PerformancePush.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Performance for Push -on: - push: - branches: [ master ] - -permissions: - # deployments permission to deploy GitHub pages website - deployments: write - # contents permission to update benchmark contents in gh-pages branch - contents: write - -jobs: - benchmark: - name: Performance regression check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - # Run benchmark and stores the output to a file - - name: Run benchmark - run: make benchmark - # Run `github-action-benchmark` action - - name: Store benchmark result - uses: benchmark-action/github-action-benchmark@v1 - with: - tool: 'go' - output-file-path: output.txt - benchmark-data-dir-path: benchmark-monitoring - save-data-file: false - fail-on-alert: true - alert-threshold: '110%' - fail-threshold: '200%' - # GitHub API token to make a commit comment - github-token: ${{ secrets.GITHUB_TOKEN }} - # Enable alert commit comment - comment-on-alert: true - comment-always: true - gh-pages-branch: gh-pages - # alert-comment-cc-users: '@XXX' - auto-push: true \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 697ab0f..b42bc20 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,10 +23,20 @@ jobs: needs: test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: "lts/*" - - name: Run semantic-release - if: github.repository == 'casbin/casbin-go-cli' && github.event_name == 'push' - run: make release + - name: Install dependencies + run: npm clean-install + - name: Verify the integrity of provenance attestations and registry signatures for installed dependencies + run: npm audit signatures + - name: Release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: npx semantic-release diff --git a/Makefile b/Makefile index 42688f1..b4368aa 100644 --- a/Makefile +++ b/Makefile @@ -11,8 +11,3 @@ benchmark: lint: golangci-lint run --verbose - -release: - yarn global add semantic-release@17.2.4 - semantic-release - From 291e794662cb1671f1d388cc3c24885899cee853 Mon Sep 17 00:00:00 2001 From: MuZhou233 Date: Fri, 12 Jul 2024 12:55:27 +0100 Subject: [PATCH 2/2] fix: update ci configs --- .github/workflows/build.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b42bc20..9a37bd1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,13 +30,9 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: "lts/*" + node-version: 20 - - name: Install dependencies - run: npm clean-install - - name: Verify the integrity of provenance attestations and registry signatures for installed dependencies - run: npm audit signatures - name: Release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: npx semantic-release + run: npx semantic-release@v19.0.2