docs: fix API coverage table to match actual Namecheap API #40
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: Python CI/CD | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| - name: Set up Python | |
| run: uv python install 3.12 | |
| - name: Install dependencies | |
| run: uv sync --all-extras | |
| - name: Run ruff check | |
| run: uv run ruff check | |
| - name: Run ruff format check | |
| run: uv run ruff format --check | |
| publish: | |
| needs: lint | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v3 | |
| - name: Build package | |
| run: uv build | |
| - name: Check if version exists on PyPI | |
| id: check | |
| run: | | |
| WHEEL=$(ls dist/*.whl | head -1) | |
| PACKAGE_NAME=$(echo $WHEEL | cut -d'/' -f2 | cut -d'-' -f1) | |
| VERSION=$(echo $WHEEL | cut -d'/' -f2 | cut -d'-' -f2) | |
| if [ -z "$VERSION" ] || [ -z "$PACKAGE_NAME" ]; then | |
| echo "Failed to extract package name or version from wheel" | |
| exit 1 | |
| fi | |
| echo "package=$PACKAGE_NAME" >> $GITHUB_OUTPUT | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "Checking PyPI for $PACKAGE_NAME version $VERSION" | |
| if curl -sf https://pypi.org/pypi/$PACKAGE_NAME/$VERSION/json > /dev/null 2>&1; then | |
| echo "exists=true" >> $GITHUB_OUTPUT | |
| echo "Version $VERSION already exists on PyPI" | |
| else | |
| echo "exists=false" >> $GITHUB_OUTPUT | |
| echo "Version $VERSION not on PyPI, will publish" | |
| fi | |
| - name: Publish to PyPI | |
| if: steps.check.outputs.exists == 'false' | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| - name: Create git tag | |
| if: steps.check.outputs.exists == 'false' | |
| run: | | |
| VERSION=${{ steps.check.outputs.version }} | |
| git config user.name github-actions | |
| git config user.email github-actions@github.com | |
| git tag -a "v$VERSION" -m "Release v$VERSION" | |
| git push origin "v$VERSION" | |
| - name: Check for cliff.toml | |
| if: steps.check.outputs.exists == 'false' | |
| id: check-cliff | |
| run: | | |
| if [ -f .github/cliff.toml ]; then | |
| echo "has_cliff=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "has_cliff=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Generate Changelog | |
| if: steps.check.outputs.exists == 'false' && steps.check-cliff.outputs.has_cliff == 'true' | |
| id: git-cliff | |
| uses: orhun/git-cliff-action@v4 | |
| with: | |
| config: .github/cliff.toml | |
| args: --latest | |
| env: | |
| OUTPUT: CHANGELOG.md | |
| GITHUB_REPO: ${{ github.repository }} | |
| - name: Create GitHub Release | |
| if: steps.check.outputs.exists == 'false' && steps.check-cliff.outputs.has_cliff == 'true' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: v${{ steps.check.outputs.version }} | |
| body: ${{ steps.git-cliff.outputs.content }} |