sfq 0.0.17__tar.gz → 0.0.18__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,106 @@
1
+ name: Version, Build, and Publish
2
+
3
+ on:
4
+ push:
5
+ branches: ["main"]
6
+ workflow_dispatch:
7
+
8
+ permissions:
9
+ contents: write
10
+ id-token: write
11
+
12
+ jobs:
13
+ release:
14
+ runs-on: ubuntu-latest
15
+ environment: release
16
+
17
+ steps:
18
+ - name: Checkout repo
19
+ uses: actions/checkout@v4
20
+
21
+ - name: Set up Python 3.12
22
+ uses: actions/setup-python@v5
23
+ with:
24
+ python-version: 3.12
25
+
26
+ - name: Install uv CLI
27
+ uses: astral-sh/setup-uv@v4
28
+ with:
29
+ version: latest
30
+ enable-cache: true
31
+
32
+ - name: Sync dependencies with uv
33
+ run: uv sync
34
+
35
+ - name: Authenticate GitHub CLI
36
+ run: |
37
+ echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
38
+
39
+ - name: Calculate next patch version from latest tag (using gh)
40
+ id: get_version
41
+ run: |
42
+ echo "Fetching tags using gh CLI..."
43
+
44
+ TAGS=$(gh api repos/${{ github.repository }}/tags --jq '.[].name' | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | sort -V)
45
+
46
+ echo "All semver tags found:"
47
+ echo "$TAGS"
48
+
49
+ LATEST_TAG=$(echo "$TAGS" | tail -n1)
50
+ echo "Latest tag found: $LATEST_TAG"
51
+
52
+ if [ -z "$LATEST_TAG" ]; then
53
+ NEXT_VERSION="0.0.1"
54
+ echo "No tags found, starting at $NEXT_VERSION"
55
+ else
56
+ IFS='.' read -r MAJOR MINOR PATCH <<< "$LATEST_TAG"
57
+ PATCH=$((PATCH + 1))
58
+ NEXT_VERSION="$MAJOR.$MINOR.$PATCH"
59
+ echo "Incremented patch version to $NEXT_VERSION"
60
+ fi
61
+
62
+ echo "version=$NEXT_VERSION" >> $GITHUB_OUTPUT
63
+
64
+ - name: Update version strings in files
65
+ run: |
66
+ VERSION=${{ steps.get_version.outputs.version }}
67
+
68
+ echo "Updating pyproject.toml version to $VERSION"
69
+ sed -i -E "s/(^version *= *\")([0-9]+\.[0-9]+\.[0-9]+)(\")/\1$VERSION\3/" pyproject.toml
70
+
71
+ echo "Updating uv.lock version to $VERSION"
72
+ sed -i -E "s/(^version *= *\")([0-9]+\.[0-9]+\.[0-9]+)(\")/\1$VERSION\3/" uv.lock
73
+
74
+ echo "Updating src/sfq/__init__.py user_agent to $VERSION"
75
+ sed -i -E "s/(user_agent: str = \"sfq\/)[0-9]+\.[0-9]+\.[0-9]+(\")/\1$VERSION\2/" src/sfq/__init__.py
76
+ sed -i -E "s/(default is \"sfq\/)[0-9]+\.[0-9]+\.[0-9]+(\")/\1$VERSION\2/" src/sfq/__init__.py
77
+
78
+ - name: Commit version updates
79
+ run: |
80
+ git config user.name "github-actions"
81
+ git config user.email "github-actions@users.noreply.github.com"
82
+ git add pyproject.toml uv.lock src/sfq/__init__.py
83
+ git commit -m "chore: bump version to ${{ steps.get_version.outputs.version }}"
84
+ git push
85
+
86
+ - name: Create and push git tag
87
+ run: |
88
+ VERSION=${{ steps.get_version.outputs.version }}
89
+ git tag $VERSION
90
+ git push origin $VERSION
91
+
92
+ - name: Build package with uv
93
+ run: uv build
94
+
95
+ - name: Publish package distributions to PyPI
96
+ uses: pypa/gh-action-pypi-publish@release/v1
97
+
98
+ - name: Upload artifacts to GitHub Release (prerelease)
99
+ uses: softprops/action-gh-release@v2
100
+ with:
101
+ tag_name: ${{ steps.get_version.outputs.version }}
102
+ name: Release ${{ steps.get_version.outputs.version }}
103
+ files: dist/*
104
+ prerelease: true
105
+ env:
106
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sfq
3
- Version: 0.0.17
3
+ Version: 0.0.18
4
4
  Summary: Python wrapper for the Salesforce's Query API.
5
5
  Author-email: David Moruzzi <sfq.pypi@dmoruzi.com>
6
6
  Keywords: salesforce,salesforce query
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "sfq"
3
- version = "0.0.17"
3
+ version = "0.0.18"
4
4
  description = "Python wrapper for the Salesforce's Query API."
5
5
  readme = "README.md"
6
6
  authors = [{ name = "David Moruzzi", email = "sfq.pypi@dmoruzi.com" }]
@@ -84,7 +84,7 @@ class SFAuth:
84
84
  access_token: Optional[str] = None,
85
85
  token_expiration_time: Optional[float] = None,
86
86
  token_lifetime: int = 15 * 60,
87
- user_agent: str = "sfq/0.0.17",
87
+ user_agent: str = "sfq/0.0.18",
88
88
  sforce_client: str = "_auto",
89
89
  proxy: str = "_auto",
90
90
  ) -> None:
@@ -100,7 +100,7 @@ class SFAuth:
100
100
  :param access_token: The access token for the current session (default is None).
101
101
  :param token_expiration_time: The expiration time of the access token (default is None).
102
102
  :param token_lifetime: The lifetime of the access token in seconds (default is 15 minutes).
103
- :param user_agent: Custom User-Agent string (default is "sfq/0.0.17").
103
+ :param user_agent: Custom User-Agent string (default is "sfq/0.0.18").
104
104
  :param sforce_client: Custom Application Identifier (default is user_agent).
105
105
  :param proxy: The proxy configuration, "_auto" to use environment (default is "_auto").
106
106
  """
@@ -3,5 +3,5 @@ requires-python = ">=3.9"
3
3
 
4
4
  [[package]]
5
5
  name = "sfq"
6
- version = "0.0.17"
6
+ version = "0.0.18"
7
7
  source = { editable = "." }
@@ -1,37 +0,0 @@
1
- name: Publish to PyPI
2
-
3
- on:
4
- release:
5
- types: [published]
6
- workflow_dispatch:
7
-
8
- jobs:
9
-
10
- publish-release:
11
- name: upload release to PyPI
12
- runs-on: ubuntu-latest
13
- permissions:
14
- id-token: write
15
- environment: release
16
- steps:
17
- - name: Check out repository
18
- uses: actions/checkout@v4
19
-
20
- - uses: actions/setup-python@v5
21
- with:
22
- python-version: "3.12"
23
-
24
- - name: Install uv
25
- uses: astral-sh/setup-uv@v4
26
- with:
27
- version: "latest"
28
- enable-cache: true
29
-
30
- - name: Uv sync
31
- run: uv sync
32
-
33
- - name: Build package
34
- run: uv build
35
-
36
- - name: Publish package distributions to PyPI
37
- uses: pypa/gh-action-pypi-publish@release/v1
File without changes
File without changes
File without changes
File without changes
File without changes