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..9a37bd1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,10 +23,16 @@ 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: 20 - - name: Run semantic-release - if: github.repository == 'casbin/casbin-go-cli' && github.event_name == 'push' - run: make release + - name: Release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: npx semantic-release@v19.0.2 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 -