Skip to content

Publish Python Packages #5

Publish Python Packages

Publish Python Packages #5

Workflow file for this run

# 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 Python Packages
on:
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install Ubuntu related dependencies
run: |
sudo apt-get update && sudo apt-get install -y libsasl2-dev unixodbc-dev python3-venv
- name: Install and Publish PyPi packages for collate-dbt-artifacts-parser
env:
TWINE_USERNAME: '${{ secrets.TWINE_USERNAME }}'
TWINE_PASSWORD: '${{ secrets.TWINE_PASSWORD }}'
run: |
python3 -m venv env
source env/bin/activate
pip install -r requirements.setup.txt
pip install .
python -m build
twine check dist/*
twine upload dist/* --verbose