diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..51e3872 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,21 @@ +name: Release + +on: + push: + branches: + - main + +jobs: + release: + name: Release + needs: [golangci, test] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: run semantic release + if: github.repository == 'JunNishimura/casbin-bun-adapter' && github.event_name == 'push' + run: | + npm install --save-dev semantic-release@latest + npx semantic-release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.releaserc.yml b/.releaserc.yml new file mode 100644 index 0000000..988cf61 --- /dev/null +++ b/.releaserc.yml @@ -0,0 +1,18 @@ +{ + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + [ + "@semantic-release/changelog", + { + "changelogFile": "docs/CHANGELOG.md" + } + ], + [ + "@semantic-release/git", + { + "assets": ["docs/CHANGELOG.md"] + } + ] + ] +} \ No newline at end of file