| name: Release | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| semantic-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Run semantic-release | |
| if: github.repository == 'casbin/casbin-cpp' && github.event_name == 'push' | |
| run: | | |
| npm install -g semantic-release@19.0.5 | |
| semantic-release | |
| sleep 10 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |