Skip to content

Commit

Permalink
feat: add semantic-release (#9)
Browse files Browse the repository at this point in the history
Signed-off-by: Yixiang Zhao <[email protected]>
  • Loading branch information
seriouszyx authored Mar 10, 2022
1 parent f42b81e commit b76ddc6
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Go

on:
- push
- pull_request

jobs:

test:
runs-on: ubuntu-latest

steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15

- uses: actions/checkout@v2
- name: Run Unit tests
run: go test -v ./...

semantic-release:
needs: [ test ]
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v2
- name: Run semantic-release
if: github.repository == 'casdoor/go-sms-sender' && github.event_name == 'push'
run: |
npm install --save-dev [email protected]
npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16 changes: 16 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -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"
]
}

0 comments on commit b76ddc6

Please sign in to comment.