Update chains-api mcp #8
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: Auto Tag | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - package.json | |
| jobs: | |
| auto-tag: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get version from package.json | |
| id: pkg | |
| run: echo "version=$(node -p "require('./package.json').version")" >> "$GITHUB_OUTPUT" | |
| - name: Check if tag already exists | |
| id: check | |
| run: | | |
| if git rev-parse "v${{ steps.pkg.outputs.version }}" >/dev/null 2>&1; then | |
| echo "exists=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "exists=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Create and push tag | |
| if: steps.check.outputs.exists == 'false' | |
| run: | | |
| git tag "v${{ steps.pkg.outputs.version }}" | |
| git push origin "v${{ steps.pkg.outputs.version }}" |