From e703de515c898903a9c4b540a3b58ee005e4df30 Mon Sep 17 00:00:00 2001 From: David Abutbul Date: Sat, 24 May 2025 01:25:42 +0300 Subject: [PATCH 1/6] Add GitHub Actions workflow for creating release artifacts and update .gitignore to include additional files --- .github/workflows/release.yml | 36 +++++++++++++++++++++++++++++++++++ .gitignore | 5 ++++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..c15313e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,36 @@ +name: Create Release Artifacts + +on: + push: + tags: + - 'v*' # Trigger on tags like v1.0, v2.0.1, etc. + +jobs: + build_and_upload_artifacts: + name: Build and Upload Distribution Artifacts + runs-on: ubuntu-latest + permissions: + contents: read # Needed to checkout the repository + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' # You can specify your desired Python version + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel + + - name: Build distribution archives + run: python setup.py sdist bdist_wheel + + - name: Upload distribution artifacts + uses: actions/upload-artifact@v4 + with: + name: python-package-distributions + path: dist/ diff --git a/.gitignore b/.gitignore index 023f19c..d8ad360 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,7 @@ project-*.md .venv build/ __pycache__/ -*.egg-info/ \ No newline at end of file +*.egg-info/ +dist/ +uv.lock +publish.md \ No newline at end of file From b2fd252030d2767a5c32bf8c233d3fa1998d4dc4 Mon Sep 17 00:00:00 2001 From: David Abutbul Date: Sat, 24 May 2025 01:27:39 +0300 Subject: [PATCH 2/6] Update .github/workflows/release.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c15313e..a14670b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,6 +26,8 @@ jobs: python -m pip install --upgrade pip pip install setuptools wheel + - name: Clean dist directory + run: rm -rf dist - name: Build distribution archives run: python setup.py sdist bdist_wheel From a7c28f62562f180f298f1c5b001e2e1ab9cac39a Mon Sep 17 00:00:00 2001 From: David Abutbul Date: Sat, 24 May 2025 01:31:05 +0300 Subject: [PATCH 3/6] Update release workflow to support manual triggers and use Python build module for artifact creation --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a14670b..12c2d72 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,7 @@ name: Create Release Artifacts on: + workflow_dispatch: push: tags: - 'v*' # Trigger on tags like v1.0, v2.0.1, etc. @@ -29,7 +30,7 @@ jobs: - name: Clean dist directory run: rm -rf dist - name: Build distribution archives - run: python setup.py sdist bdist_wheel + run: python -m build --sdist --wheel - name: Upload distribution artifacts uses: actions/upload-artifact@v4 From 10e8365b1c9f057ea8010a48875a87ea955c5bc1 Mon Sep 17 00:00:00 2001 From: David Abutbul Date: Sat, 24 May 2025 01:45:43 +0300 Subject: [PATCH 4/6] Update .github/workflows/release.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/release.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 12c2d72..b0deefd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,6 +22,13 @@ jobs: with: python-version: '3.11' # You can specify your desired Python version + - name: Cache pip dependencies + uses: actions/cache@v3 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- - name: Install dependencies run: | python -m pip install --upgrade pip From dbbbebe1bd3a98d4af174adfb00a63ea0f7ba835 Mon Sep 17 00:00:00 2001 From: David Abutbul Date: Sat, 24 May 2025 01:46:37 +0300 Subject: [PATCH 5/6] Update Python version in release workflow to 3.10 --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b0deefd..051a096 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' # You can specify your desired Python version + python-version: '3.10' - name: Cache pip dependencies uses: actions/cache@v3 From b2995ed5775b39ad07d98eaa95f9b44688334fb5 Mon Sep 17 00:00:00 2001 From: David Abutbul Date: Sat, 24 May 2025 01:47:50 +0300 Subject: [PATCH 6/6] Update .github/workflows/release.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 051a096..2466ce9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,7 +32,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install setuptools wheel + pip install setuptools wheel build - name: Clean dist directory run: rm -rf dist