Fix InternalLogger logging hierarchy and bump to v1.1.1 (#18) #14
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: "Publish to PyPI" | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/main' | |
| environment: release | |
| permissions: | |
| id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
| contents: read | |
| steps: | |
| - name: Checkout repo + submodules | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.10" | |
| - name: Check if version already published | |
| id: version-check | |
| run: | | |
| VERSION=$(cat sdk_reforge/VERSION | tr -d '\n') | |
| echo "Current version: $VERSION" | |
| # Check if this version exists on PyPI | |
| HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "https://pypi.org/pypi/sdk-reforge/$VERSION/json") | |
| if [ "$HTTP_STATUS" = "200" ]; then | |
| echo "Version $VERSION already exists on PyPI" | |
| echo "skip=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "Version $VERSION not found on PyPI, proceeding with publish" | |
| echo "skip=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Install Poetry | |
| if: steps.version-check.outputs.skip == 'false' | |
| uses: snok/install-poetry@v1 | |
| with: | |
| virtualenvs-create: true | |
| - name: Install dependencies | |
| if: steps.version-check.outputs.skip == 'false' | |
| run: | | |
| poetry install --no-interaction | |
| - name: Run tests | |
| if: steps.version-check.outputs.skip == 'false' | |
| run: poetry run pytest | |
| env: | |
| REFORGE_INTEGRATION_TEST_SDK_KEY: ${{ secrets.REFORGE_INTEGRATION_TEST_SDK_KEY }} | |
| REFORGE_INTEGRATION_TEST_ENCRYPTION_KEY: "c87ba22d8662282abe8a0e4651327b579cb64a454ab0f4c170b45b15f049a221" | |
| NOT_A_NUMBER: "not a number" | |
| IS_A_NUMBER: 1234 | |
| - name: Build package | |
| if: steps.version-check.outputs.skip == 'false' | |
| run: poetry build | |
| - name: Publish to PyPI | |
| if: steps.version-check.outputs.skip == 'false' | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| packages-dir: dist/ |