[issue-2239] - Update core publish to push (#2240)

* Update core publish to push

* Rename jobs to be py explicit

* Upload to testpypi
This commit is contained in:
Pere Miquel Brull 2022-01-17 19:29:55 +01:00 committed by GitHub
parent 6be3ddb7e2
commit de3b3e4abc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 17 deletions

View File

@ -9,17 +9,22 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# When a new push happens to the main branch that
# modifies the JSON Schemas, we are going to
# generate the updated pydantic models and
# publish a new version of openmetadata-core
name: Publish openmetadata-ingestion-core packages name: Publish openmetadata-ingestion-core packages
on: on:
pull_request: push:
branches: branches:
- main - main
paths: paths:
- 'catalog-rest-service/src/main/resources/json/**' - 'catalog-rest-service/src/main/resources/json/**'
jobs: jobs:
build-and-push: py-core-build-and-push:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@ -36,21 +41,11 @@ jobs:
python3 -m venv env python3 -m venv env
source env/bin/activate source env/bin/activate
make generate make generate
- name: Bump Version - name: Publish Test PyPi packages
working-directory: ingestion-core
run: |
source env/bin/activate
make bump-version-dev
- name: Publish PyPi packages
working-directory: ingestion-core working-directory: ingestion-core
env: env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} TWINE_USERNAME: ${{ secrets.TWINE_USERNAME_TEST }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD_TEST }}
run: | run: |
source env/bin/activate source env/bin/activate
make publish make publish
- name: Commit and Push New Version
uses: EndBug/add-and-commit@v7
with:
message: openmetadata-ingestion-core version bumped
add: ./ingestion-core/src/metadata/_version.py

View File

@ -21,7 +21,7 @@ on:
paths: paths:
- ingestion/** - ingestion/**
jobs: jobs:
run_tests: py-run-tests:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout

View File

@ -15,4 +15,4 @@ bump-version-dev:
publish: clean generate publish: clean generate
python setup.py install sdist bdist_wheel python setup.py install sdist bdist_wheel
twine check dist/* twine check dist/*
twine upload dist/* twine upload -r testpypi dist/*