Skip to content

Commit ae44f47

Browse files
committed
Add JFrog publish workflow for pyiceberg
Publishes pyiceberg to the openhouse-pypi JFrog repository on each push to li-0.11, auto-incrementing the patch version via git tags.
1 parent b78e54c commit ae44f47

1 file changed

Lines changed: 63 additions & 0 deletions

File tree

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: "Publish to JFrog"
2+
3+
on:
4+
push:
5+
branches:
6+
- 'li-0.11'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
set-version:
13+
runs-on: ubuntu-latest
14+
outputs:
15+
VERSION: ${{ steps.get-version.outputs.VERSION }}
16+
steps:
17+
- uses: actions/checkout@v6
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Bump version and push tag
22+
uses: anothrNick/github-tag-action@1.69.0
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
WITH_V: true
26+
DEFAULT_BUMP: patch
27+
INITIAL_VERSION: 0.11.1
28+
29+
- name: Get the latest tag
30+
id: get-version
31+
run: |
32+
latest_tag=$(git describe --tags --abbrev=0)
33+
VERSION=${latest_tag#v}
34+
echo "VERSION=${VERSION}" >> "$GITHUB_OUTPUT"
35+
echo "Publishing version ${VERSION}"
36+
37+
build:
38+
needs: set-version
39+
uses: ./.github/workflows/pypi-build-artifacts.yml
40+
with:
41+
VERSION: ${{ needs.set-version.outputs.VERSION }}
42+
43+
publish:
44+
name: Publish to JFrog Artifactory
45+
needs: build
46+
runs-on: ubuntu-latest
47+
steps:
48+
- name: Download all the artifacts
49+
uses: actions/download-artifact@v7
50+
with:
51+
merge-multiple: true
52+
path: dist/
53+
54+
- name: List downloaded artifacts
55+
run: ls -R dist/
56+
57+
- name: Publish to JFrog Artifactory PyPI
58+
uses: pypa/gh-action-pypi-publish@release/v1
59+
with:
60+
repository-url: https://linkedin.jfrog.io/artifactory/api/pypi/openhouse-pypi
61+
user: ${{ secrets.JFROG_USERNAME }}
62+
password: ${{ secrets.JFROG_PYPI_API_TOKEN }}
63+
verbose: true

0 commit comments

Comments
 (0)