InterSystems IRIS MCP Server

by caretdev
Verified
name: Upload Python Package on: release: types: [published] push: branches: [master] pull_request: branches: [master] jobs: release-build: if: github.event_name != 'pull_request' runs-on: ubuntu-latest permissions: id-token: write contents: write steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: "3.12" - name: Install dependencies id: set-version run: | VERSION=$(grep version pyproject.toml | cut -d= -f2 | tr -d '[:blank:]' | tr -d '"') [ $GITHUB_EVENT_NAME == 'push' ] && VERSION+=b && VERSION+=$(($(git tag -l "*$VERSION*" | cut -db -f2 | sort -n | tail -1)+1)) [ $GITHUB_EVENT_NAME == 'release' ] && VERSION=${{ github.event.release.tag_name }} && VERSION=${VERSION/v/} echo VERSION = $VERSION sed -ie "s/version = .*/version = \"$VERSION\"/" pyproject.toml echo version=$VERSION >> $GITHUB_OUTPUT - name: Build release distributions run: | # NOTE: put your own distribution build steps here. python -m pip install -e . python -m pip install build python -m build - name: Create Beta Release id: create_release if: github.event_name == 'push' uses: softprops/action-gh-release@v2 with: tag_name: v${{ steps.set-version.outputs.version }} prerelease: ${{ github.event_name != 'release' }} - name: Publish release distributions to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: packages-dir: dist/ - name: Bump version if: github.event_name == 'release' run: | git config --global user.name 'ProjectBot' git config --global user.email 'bot@users.noreply.github.com' VERSION=${{ github.event.release.tag_name }} && VERSION=${VERSION/v/} VERSION=`echo $VERSION | awk -F. '/[0-9]+\./{$NF++;print}' OFS=.` sed -ie "s/version = .*/version = \"$VERSION\"/" pyproject.toml git add pyproject.toml git commit -m 'auto bump version with release' git push