diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 02cbddd..0bf1841 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,7 +11,7 @@ jobs: runs-on: "ubuntu-latest" environment: - name: deploy + name: release steps: - uses: "actions/checkout@v4" @@ -25,10 +25,11 @@ jobs: python-version: 3.9 uv-version: "0.5.22" + - name: "Install dependencies" + run: uv sync --all-extras --dev + - name: "Build package & docs" run: "scripts/build" - name: "Publish to PyPI & deploy docs" run: "scripts/publish" - env: - UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }} diff --git a/.gitignore b/.gitignore index b77ac79..5f275ef 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,7 @@ dmypy.json # Editor configuration .vscode/ + +# Build artifacts +httpx_retries.egg-info/ +site/ diff --git a/LICENSE b/LICENSE index fdf7637..2d834d0 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2024 Will Ockmore +Copyright (c) 2024 William Ockmore Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index b709551..5459372 100644 --- a/README.md +++ b/README.md @@ -5,10 +5,9 @@ Test Suite - - - - + + Package version +

diff --git a/docs/index.md b/docs/index.md index e021ac6..9603d65 100644 --- a/docs/index.md +++ b/docs/index.md @@ -5,10 +5,9 @@ Test Suite - - - - + + Package version +

A retry layer for HTTPX. diff --git a/scripts/publish b/scripts/publish index 31c07b4..de4cdbf 100755 --- a/scripts/publish +++ b/scripts/publish @@ -2,20 +2,19 @@ set -euo pipefail +if [ "${GITHUB_ACTIONS:-}" = "true" ]; then + git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" + git config --local user.name "GitHub Action" -if [ ! -z "$GITHUB_ACTIONS" ]; then - git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" - git config --local user.name "GitHub Action" + VERSION="$(uvx hatch version)" - VERSION="$(uvx hatch version)" - - if [ "refs/tags/${VERSION}" != "${GITHUB_REF}" ] ; then - echo "GitHub Ref '${GITHUB_REF}' did not match package version '${VERSION}'" - exit 1 - fi + if [ "refs/tags/${VERSION}" != "${GITHUB_REF}" ] ; then + echo "The tag ${VERSION} does not match the GitHub ref ${GITHUB_REF}" + exit 1 + fi fi -set -x - uv publish uv run mkdocs gh-deploy --force + +echo "Done! 🎉"