From 65a3872173bca56efd9f4cc5cd940e97bd3dd70e Mon Sep 17 00:00:00 2001 From: Rabi Narayan Sahoo <106670146+Rabi-Sahoo@users.noreply.github.com> Date: Tue, 28 Jun 2022 06:07:32 -0700 Subject: [PATCH] [Issue - 5426] Automatically publish openmetadata-airflow-apis (#5698) Co-authored-by: Rabi Narayan Sahoo <106670146+Robby30ies@users.noreply.github.com> --- .../workflows/openmetadata-airflow-apis.yml | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflows/openmetadata-airflow-apis.yml diff --git a/.github/workflows/openmetadata-airflow-apis.yml b/.github/workflows/openmetadata-airflow-apis.yml new file mode 100644 index 00000000000..95e5a3120ef --- /dev/null +++ b/.github/workflows/openmetadata-airflow-apis.yml @@ -0,0 +1,62 @@ +# Copyright 2021 Collate +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: Publish openmetadata-airflow-apis + +on: + workflow_dispatch: + +jobs: + publish-test: + runs-on: ubuntu-latest + environment: test + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.9 + uses: actions/setup-python@v2 + with: + python-version: 3.9 + - name: Install Ubuntu related dependencies + run: | + sudo apt-get install -y libsasl2-dev unixodbc-dev python3-venv antlr4 + - name: Install and Publish Test PyPi packages + env: + TWINE_USERNAME: ${{ secrets.TWINE_USERNAME_TEST }} + TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD_TEST }} + run: | + make install_dev install_apis + cd openmetadata-airflow-apis; \ + python setup.py install sdist bdist_wheel; \ + twine check dist/*; \ + twine upload -r testpypi dist/* + publish: + needs: [publish-test] + runs-on: ubuntu-latest + environment: release + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.9 + uses: actions/setup-python@v2 + with: + python-version: 3.9 + - name: Install Ubuntu related dependencies + run: | + sudo apt-get install -y libsasl2-dev unixodbc-dev python3-venv + - name: Install and Publish PyPi packages + env: + TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} + TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} + run: | + make install_dev install_apis + cd openmetadata-airflow-apis; \ + python setup.py install sdist bdist_wheel; \ + twine check dist/*; \ + twine upload dist/*