From 10ae09544056b7aae1ac9e224aedc84222648ce6 Mon Sep 17 00:00:00 2001 From: closetool <4closetool3@gmail.com> Date: Sat, 1 May 2021 10:49:58 +0800 Subject: [PATCH] fix: github action bot Signed-off-by: closetool <4closetool3@gmail.com> --- .github/workflows/ci.yml | 9 ++++++--- .releaserc.json | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 .releaserc.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2d918db..7566b95 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,8 +52,11 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Run semantic-release - uses: go-semantic-release/action@v1 if: github.repository == 'casbin/gorm-adapter' && github.event_name == 'push' - with: - github-token: ${{ secrets.GH_TOKEN }} \ No newline at end of file + run: | + npm install --save-dev semantic-release@17.2.4 + npx semantic-release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.releaserc.json b/.releaserc.json new file mode 100644 index 0000000..58cb0bb --- /dev/null +++ b/.releaserc.json @@ -0,0 +1,16 @@ +{ + "debug": true, + "branches": [ + "+([0-9])?(.{+([0-9]),x}).x", + "master", + { + "name": "beta", + "prerelease": true + } + ], + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + "@semantic-release/github" + ] +}