Skip to content

Commit

Permalink
feat: add semantic_release (#28)
Browse files Browse the repository at this point in the history
* feat: add semantic_release

* feat: add semantic_release

* fix: disable minikube's proxy
  • Loading branch information
PokIsemaine authored Feb 6, 2023
1 parent 284f244 commit 6e3e4f2
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/semantic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Always validate the PR title AND all the commits
titleAndCommits: true
18 changes: 16 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
unit-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v2
with:
Expand All @@ -26,7 +26,7 @@ jobs:
e2e-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v2
with:
Expand All @@ -37,3 +37,17 @@ jobs:
run: cd e2e/pretest && ./env_setup.sh
- name: run e2e test
run: cd e2e && ./test.sh

semantic-release:
name: Semantic Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Run semantic-release
if: github.repository == 'casbin/k8s-gatekeeper' && 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"
]
}
2 changes: 1 addition & 1 deletion e2e/pretest/env_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ fi
echo "[E2E PreTest] start minikube environment"
minikube delete
#minikube start
minikube start --image-mirror-country='cn'
minikube start



Expand Down

0 comments on commit 6e3e4f2

Please sign in to comment.