From 68128716e23237854aab62557ec52e282ceac15b Mon Sep 17 00:00:00 2001 From: devajithvs Date: Sun, 5 Dec 2021 16:01:09 +0000 Subject: [PATCH] feat: Add Semantic Versioning (#17) Signed-off-by: devajithvs --- .github/workflows/ci.yml | 15 ++++++++++++++- .releaserc.json | 13 +++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 .releaserc.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f7f155f..50ed6cd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,4 +26,17 @@ jobs: docker run -d -p 50051:50051 casbin/casbin-server - name: Go Test - run: go test ./... \ No newline at end of file + run: go test ./... + + semantic-release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Run semantic-release + if: github.repository == 'casbin/casbin-go-client' && github.event_name == 'push' + run: | + export PATH="$(yarn global bin):$PATH" + yarn global add semantic-release + 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..0a0d093 --- /dev/null +++ b/.releaserc.json @@ -0,0 +1,13 @@ +{ + "debug": true, + "release": { + "branches": [ + "master" + ] + }, + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + "@semantic-release/github" + ] +} \ No newline at end of file