From 7be046122ba9cf925e3d488a3324924b5768b59a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 16 Jan 2026 13:20:34 +0000 Subject: [PATCH 1/8] Initial plan From 72c8cbc65dcd583d232fbefeee038d46b5b9db57 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 16 Jan 2026 13:28:18 +0000 Subject: [PATCH 2/8] Add GitHub Action workflow for publishing to PyPI Co-authored-by: sokripon <79755465+sokripon@users.noreply.github.com> --- .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..0f43dd3 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,32 @@ +name: Publish to PyPI + +on: + release: + types: [published] + workflow_dispatch: + +permissions: + contents: read + id-token: write # Required for trusted publishing + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install uv + uses: astral-sh/setup-uv@v4 + + - name: Set up Python + run: uv python install 3.12 + + - name: Install dependencies + run: uv sync --group dev + + - name: Build package + run: uv build + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 From d3abe116c542af8448827e51ae2798e233dc590a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 16 Jan 2026 13:28:44 +0000 Subject: [PATCH 3/8] Add setup documentation to publish workflow Co-authored-by: sokripon <79755465+sokripon@users.noreply.github.com> --- .github/workflows/publish.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0f43dd3..46f8e38 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,3 +1,22 @@ +# Publish package to PyPI +# +# This workflow publishes the package to PyPI using trusted publishing (OIDC). +# +# Setup Instructions: +# 1. Go to https://pypi.org/manage/account/publishing/ +# 2. Add a new "pending publisher" with these details: +# - PyPI Project Name: tacomail +# - Owner: sokripon +# - Repository name: python-tacomail +# - Workflow name: publish.yml +# - Environment name: (leave blank) +# 3. Create a GitHub release to trigger automatic publishing +# +# Manual Publishing: +# - Go to Actions tab > Publish to PyPI > Run workflow +# +# Note: The package version is defined in pyproject.toml + name: Publish to PyPI on: From baba5f3ffb742e966065b4eb5c49d6a413a1b091 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 16 Jan 2026 13:29:41 +0000 Subject: [PATCH 4/8] Remove unnecessary dev dependencies from publish workflow Co-authored-by: sokripon <79755465+sokripon@users.noreply.github.com> --- .github/workflows/publish.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 46f8e38..b13c8da 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -41,9 +41,6 @@ jobs: - name: Set up Python run: uv python install 3.12 - - name: Install dependencies - run: uv sync --group dev - - name: Build package run: uv build From 238441ca29eafcfe2ba7844cb72bc54e9cf2a1d2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 16 Jan 2026 13:52:17 +0000 Subject: [PATCH 5/8] Remove commands from workflow, use actions only Co-authored-by: sokripon <79755465+sokripon@users.noreply.github.com> --- .github/workflows/publish.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b13c8da..b26737e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -35,14 +35,12 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install uv - uses: astral-sh/setup-uv@v4 - - - name: Set up Python - run: uv python install 3.12 - - - name: Build package - run: uv build + - name: Build and publish to PyPI + uses: hynek/build-and-inspect-python-package@v2 + with: + upload-name-suffix: -${{ github.run_id }}-${{ github.run_attempt }} - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages-dir: .dist/ From 6781c77b63da2f59b8aaa2ea1b80cd8bfcfac74d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 16 Jan 2026 13:53:25 +0000 Subject: [PATCH 6/8] Add .dist/ to .gitignore for new build action Co-authored-by: sokripon <79755465+sokripon@users.noreply.github.com> --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 4d9d73f..3feb4ad 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ __pycache__/ *.py[oc] build/ dist/ +.dist/ wheels/ *.egg-info From bf84e0cb43089182a92b0d785f45c51e36bfd7b7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 16 Jan 2026 13:58:06 +0000 Subject: [PATCH 7/8] Add version bump workflow to increase/set version number Co-authored-by: sokripon <79755465+sokripon@users.noreply.github.com> --- .github/workflows/version-bump.yml | 91 ++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 .github/workflows/version-bump.yml diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml new file mode 100644 index 0000000..dcd9eed --- /dev/null +++ b/.github/workflows/version-bump.yml @@ -0,0 +1,91 @@ +# Version Bump Workflow +# +# This workflow updates the version number in pyproject.toml +# +# Usage: +# - Go to Actions tab > Bump Version > Run workflow +# - Select version bump type: major, minor, or patch +# - Or specify a custom version number +# +# Examples: +# - Current version: 0.1.0 +# - Patch bump (0.1.0 -> 0.1.1): Select "patch" +# - Minor bump (0.1.0 -> 0.2.0): Select "minor" +# - Major bump (0.1.0 -> 1.0.0): Select "major" +# - Custom (0.1.0 -> 2.5.3): Select "custom" and enter "2.5.3" + +name: Bump Version + +on: + workflow_dispatch: + inputs: + bump_type: + description: 'Version bump type' + required: true + type: choice + options: + - patch + - minor + - major + - custom + default: 'patch' + custom_version: + description: 'Custom version (only used if bump_type is "custom")' + required: false + type: string + +permissions: + contents: write + +jobs: + bump-version: + runs-on: ubuntu-latest + + 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 bump2version + run: pip install bump2version + + - name: Configure git + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + - name: Bump version + run: | + if [ "${{ inputs.bump_type }}" = "custom" ]; then + if [ -z "${{ inputs.custom_version }}" ]; then + echo "Error: Custom version not provided" + exit 1 + fi + # Set custom version + current_version=$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/') + sed -i "s/version = \"$current_version\"/version = \"${{ inputs.custom_version }}\"/" pyproject.toml + git add pyproject.toml + git commit -m "Bump version to ${{ inputs.custom_version }}" + echo "NEW_VERSION=${{ inputs.custom_version }}" >> $GITHUB_ENV + else + # Use bump2version for semantic versioning + bump2version ${{ inputs.bump_type }} --current-version $(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/') --config-file /dev/null --no-tag --no-commit pyproject.toml + new_version=$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/') + git add pyproject.toml + git commit -m "Bump version to $new_version (${{ inputs.bump_type }})" + echo "NEW_VERSION=$new_version" >> $GITHUB_ENV + fi + + - name: Push changes + run: git push + + - name: Output new version + run: | + echo "Version bumped successfully!" + echo "New version: ${{ env.NEW_VERSION }}" + echo "::notice::Version updated to ${{ env.NEW_VERSION }}" From 5a6fbe44cd4393edd1a26ad2e085b2eb04367e84 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 16 Jan 2026 14:01:05 +0000 Subject: [PATCH 8/8] Restore commands to publish workflow and remove all comments Co-authored-by: sokripon <79755465+sokripon@users.noreply.github.com> --- .github/workflows/publish.yml | 35 ++++++++---------------------- .github/workflows/version-bump.yml | 18 --------------- .gitignore | 1 - 3 files changed, 9 insertions(+), 45 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b26737e..8b59d21 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,22 +1,3 @@ -# Publish package to PyPI -# -# This workflow publishes the package to PyPI using trusted publishing (OIDC). -# -# Setup Instructions: -# 1. Go to https://pypi.org/manage/account/publishing/ -# 2. Add a new "pending publisher" with these details: -# - PyPI Project Name: tacomail -# - Owner: sokripon -# - Repository name: python-tacomail -# - Workflow name: publish.yml -# - Environment name: (leave blank) -# 3. Create a GitHub release to trigger automatic publishing -# -# Manual Publishing: -# - Go to Actions tab > Publish to PyPI > Run workflow -# -# Note: The package version is defined in pyproject.toml - name: Publish to PyPI on: @@ -26,7 +7,7 @@ on: permissions: contents: read - id-token: write # Required for trusted publishing + id-token: write jobs: publish: @@ -35,12 +16,14 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Build and publish to PyPI - uses: hynek/build-and-inspect-python-package@v2 - with: - upload-name-suffix: -${{ github.run_id }}-${{ github.run_attempt }} + - name: Install uv + uses: astral-sh/setup-uv@v4 + + - name: Set up Python + run: uv python install 3.12 + + - name: Build package + run: uv build - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@release/v1 - with: - packages-dir: .dist/ diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml index dcd9eed..101d006 100644 --- a/.github/workflows/version-bump.yml +++ b/.github/workflows/version-bump.yml @@ -1,19 +1,3 @@ -# Version Bump Workflow -# -# This workflow updates the version number in pyproject.toml -# -# Usage: -# - Go to Actions tab > Bump Version > Run workflow -# - Select version bump type: major, minor, or patch -# - Or specify a custom version number -# -# Examples: -# - Current version: 0.1.0 -# - Patch bump (0.1.0 -> 0.1.1): Select "patch" -# - Minor bump (0.1.0 -> 0.2.0): Select "minor" -# - Major bump (0.1.0 -> 1.0.0): Select "major" -# - Custom (0.1.0 -> 2.5.3): Select "custom" and enter "2.5.3" - name: Bump Version on: @@ -66,14 +50,12 @@ jobs: echo "Error: Custom version not provided" exit 1 fi - # Set custom version current_version=$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/') sed -i "s/version = \"$current_version\"/version = \"${{ inputs.custom_version }}\"/" pyproject.toml git add pyproject.toml git commit -m "Bump version to ${{ inputs.custom_version }}" echo "NEW_VERSION=${{ inputs.custom_version }}" >> $GITHUB_ENV else - # Use bump2version for semantic versioning bump2version ${{ inputs.bump_type }} --current-version $(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/') --config-file /dev/null --no-tag --no-commit pyproject.toml new_version=$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/') git add pyproject.toml diff --git a/.gitignore b/.gitignore index 3feb4ad..4d9d73f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,6 @@ __pycache__/ *.py[oc] build/ dist/ -.dist/ wheels/ *.egg-info