Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions .github/workflows/jfrog-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: "Publish to JFrog"

on:
push:
branches:
- 'li-0.11'

concurrency:
group: jfrog-publish-${{ github.ref }}
cancel-in-progress: false

permissions:
contents: read

jobs:
tag:
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
VERSION: ${{ steps.get-version.outputs.VERSION }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Install UV
uses: astral-sh/setup-uv@v7

- name: Get initial version from pyproject.toml
id: initial-version
run: echo "VERSION=$(uv version --short)" >> "$GITHUB_OUTPUT"

- name: Bump version and push tag
uses: anothrNick/github-tag-action@1.69.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
DEFAULT_BUMP: patch
INITIAL_VERSION: ${{ steps.initial-version.outputs.VERSION }}

- name: Get the latest tag
id: get-version
run: |
latest_tag=$(git describe --tags --abbrev=0)
VERSION=${latest_tag#v}
echo "VERSION=${VERSION}" >> "$GITHUB_OUTPUT"
echo "Publishing version ${VERSION}"

build:
needs: tag
uses: ./.github/workflows/pypi-build-artifacts.yml
with:
VERSION: ${{ needs.tag.outputs.VERSION }}

publish:
name: Publish to JFrog Artifactory
needs: build
runs-on: ubuntu-latest
steps:
- name: Download all the artifacts
uses: actions/download-artifact@v7
with:
merge-multiple: true
path: dist/

- name: Publish to JFrog Artifactory PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://linkedin.jfrog.io/artifactory/api/pypi/openhouse-pypi
user: ${{ secrets.JFROG_USERNAME }}
password: ${{ secrets.JFROG_PYPI_API_TOKEN }}
verbose: true
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
[project]
name = "pyiceberg"
name = "li-pyiceberg"
version = "0.11.1"
description = "Apache Iceberg is an open table format for huge analytic datasets"
authors = [{ name = "Apache Software Foundation", email = "dev@iceberg.apache.org" }]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
def test_version_format() -> None:
from importlib import metadata

installed_version = metadata.version("pyiceberg")
installed_version = metadata.version("li-pyiceberg")

assert __version__ == installed_version, (
f"The installed version ({installed_version}) does not match the current codebase version ({__version__})."
Expand Down
Loading