Merge pull request #2793 from nanocoai/feat/a2a-approval-policies #171
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Bump version | |
| on: | |
| push: | |
| branches: [main] | |
| paths: ['src/**', 'container/**'] | |
| jobs: | |
| bump-version: | |
| if: github.repository == 'nanocoai/nanoclaw' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/create-github-app-token@v1 | |
| id: app-token | |
| with: | |
| app-id: ${{ secrets.APP_ID }} | |
| private-key: ${{ secrets.APP_PRIVATE_KEY }} | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ steps.app-token.outputs.token }} | |
| - uses: pnpm/action-setup@v4 | |
| - name: Bump patch version | |
| run: | | |
| # Skip the auto-bump when the pushed commits already changed the | |
| # version themselves (e.g. a release PR that set a minor/major). | |
| # Otherwise the bot would patch a deliberate 2.1.0 up to 2.1.1. | |
| if git diff --name-only "${{ github.event.before }}" "${{ github.sha }}" | grep -qx 'package.json'; then | |
| echo "package.json already changed in this push; skipping auto-bump." | |
| exit 0 | |
| fi | |
| pnpm version patch --no-git-tag-version | |
| git add package.json | |
| git diff --cached --quiet && exit 0 | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| VERSION=$(node -p "require('./package.json').version") | |
| git commit -m "chore: bump version to $VERSION" | |
| git pull --rebase | |
| git push |