From 69da8488efaa0fcaddfa12b85d3164cb2c5c4b7e Mon Sep 17 00:00:00 2001 From: Jay Miller Date: Fri, 27 Jun 2025 13:40:29 -0400 Subject: [PATCH 1/2] add publish.yml --- .github/workflows/publish.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..a124c83 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,32 @@ +name: Build distribution + +on: + release: + types: [created] + +jobs: + test: + uses: ./.github/workflows/test.yml + deploy: + needs: [test, lint] + name: Deploy to PyPI + permissions: + id-token: write + runs-on: ubuntu-latest + steps: + - name: Checkout source + uses: actions/checkout@v4 + + - name: Set up Python 3.11 + uses: actions/setup-python@v5 + with: + python-version: 3.11 + cache: 'pip' # caching pip dependencies + - name: Install build dependencies + run: python -m pip install build twine + + - name: Build distributions + run: python -m build + + - name: Publish package to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 From 94d35e084ed7565dd4bb7c2f23b9be2b4713865b Mon Sep 17 00:00:00 2001 From: Jay Miller Date: Fri, 27 Jun 2025 14:41:48 -0400 Subject: [PATCH 2/2] Update .github/workflows/publish.yml Co-authored-by: Dan Shernicoff --- .github/workflows/publish.yml | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a124c83..dcfed69 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,23 +10,15 @@ jobs: deploy: needs: [test, lint] name: Deploy to PyPI + runs-on: ubuntu-latest permissions: id-token: write - runs-on: ubuntu-latest steps: - - name: Checkout source - uses: actions/checkout@v4 - - - name: Set up Python 3.11 - uses: actions/setup-python@v5 + - uses: actions/checkout@v4 + - name: Install uv + uses: astral-sh/setup-uv@v5 + - run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV + - run: uv build + - uses: pypa/gh-action-pypi-publish@release/v1 with: - python-version: 3.11 - cache: 'pip' # caching pip dependencies - - name: Install build dependencies - run: python -m pip install build twine - - - name: Build distributions - run: python -m build - - - name: Publish package to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + packages-dir: ./dist