Skip to content

Commit c243efd

Browse files
committed
Add python sdk publish github action
Signed-off-by: shuheng <[email protected]>
1 parent e939430 commit c243efd

1 file changed

Lines changed: 13 additions & 73 deletions

File tree

.github/workflows/release.yml

Lines changed: 13 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -43,81 +43,21 @@ jobs:
4343
echo $VERSION_WITHOUT_PREFIX
4444
echo $HIGHEST_SEMVER_TAG
4545
46-
build-publish-docker-images:
47-
runs-on: [ubuntu-latest]
48-
needs: get-version
49-
strategy:
50-
matrix:
51-
component: [core, serving, jobservice, jupyter]
46+
publish-python-sdk:
47+
runs-on: ubuntu-latest
5248
env:
53-
MAVEN_CACHE: gs://feast-templocation-kf-feast/.m2.2020-08-19.tar
49+
TWINE_USERNAME: __token__
50+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
5451
steps:
5552
- uses: actions/checkout@v2
56-
- name: Set up QEMU
57-
uses: docker/setup-qemu-action@v1
58-
- name: Set up Docker Buildx
59-
uses: docker/setup-buildx-action@v1
60-
- name: Login to DockerHub
61-
uses: docker/login-action@v1
53+
- uses: actions/setup-python@v2
6254
with:
63-
username: ${{ secrets.DOCKERHUB_USERNAME }}
64-
password: ${{ secrets.DOCKERHUB_TOKEN }}
65-
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@v0
66-
with:
67-
version: '290.0.1'
68-
export_default_credentials: true
69-
project_id: ${{ secrets.GCP_PROJECT_ID }}
70-
service_account_key: ${{ secrets.GCP_SA_KEY }}
71-
- run: gcloud auth configure-docker --quiet
72-
- name: Get m2 cache
73-
run: |
74-
infra/scripts/download-maven-cache.sh \
75-
--archive-uri ${MAVEN_CACHE} \
76-
--output-dir .
77-
- name: Build and push versioned images
78-
env:
79-
RELEASE_VERSION: ${{ needs.get-version.outputs.release_version }}
80-
VERSION_WITHOUT_PREFIX: ${{ needs.get-version.outputs.version_without_prefix }}
81-
HIGHEST_SEMVER_TAG: ${{ needs.get-version.outputs.highest_semver_tag }}
55+
python-version: '3.8'
56+
architecture: 'x64'
57+
- name: Publish Python Package
8258
run: |
83-
docker build --build-arg VERSION=$RELEASE_VERSION \
84-
-t gcr.io/kf-feast/feast-${{ matrix.component }}:${GITHUB_SHA} \
85-
-t gcr.io/kf-feast/feast-${{ matrix.component }}:${VERSION_WITHOUT_PREFIX} \
86-
-t feastdev/feast-${{ matrix.component }}:${VERSION_WITHOUT_PREFIX} \
87-
-f infra/docker/${{ matrix.component }}/Dockerfile .
88-
docker push gcr.io/kf-feast/feast-${{ matrix.component }}:${VERSION_WITHOUT_PREFIX}
89-
docker push feastdev/feast-${{ matrix.component }}:${VERSION_WITHOUT_PREFIX}
90-
91-
echo "Only push to latest tag if tag is the highest semver version $HIGHEST_SEMVER_TAG"
92-
if [ "${VERSION_WITHOUT_PREFIX}" = "${HIGHEST_SEMVER_TAG:1}" ]
93-
then
94-
docker tag feastdev/feast-${{ matrix.component }}:${VERSION_WITHOUT_PREFIX} feastdev/feast-${{ matrix.component }}:latest
95-
docker tag gcr.io/kf-feast/feast-${{ matrix.component }}:${VERSION_WITHOUT_PREFIX} gcr.io/kf-feast/feast-${{ matrix.component }}:latest
96-
docker push feastdev/feast-${{ matrix.component }}:latest
97-
docker push gcr.io/kf-feast/feast-${{ matrix.component }}:latest
98-
fi
99-
100-
publish-helm-charts:
101-
runs-on: ubuntu-latest
102-
needs: get-version
103-
env:
104-
HELM_VERSION: v2.17.0
105-
steps:
106-
- uses: actions/checkout@v2
107-
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@v0
108-
with:
109-
version: '290.0.1'
110-
export_default_credentials: true
111-
project_id: ${{ secrets.GCP_PROJECT_ID }}
112-
service_account_key: ${{ secrets.GCP_SA_KEY }}
113-
- run: gcloud auth configure-docker --quiet
114-
- name: Validate repository versions
115-
run: make lint-versions
116-
- name: Validate chart release versions
117-
run: ./infra/scripts/validate-helm-chart-docker-image.sh
118-
- name: Remove previous Helm
119-
run: sudo rm -rf $(which helm)
120-
- name: Install Helm
121-
run: ./infra/scripts/install-helm.sh
122-
- name: Publish Helm charts
123-
run: ./infra/scripts/sync-helm-charts.sh
59+
make package-protos && make compile-protos-python
60+
cd python/
61+
python3 -m pip install --user --upgrade setuptools wheel
62+
python3 setup.py sdist bdist_wheel
63+
# python3 -m twine upload --verbose dist/*

0 commit comments

Comments
 (0)