Skip to content

v2.2.1

v2.2.1 #24

# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Publish Pyatlan Package
on:
release:
types: [ published ]
workflow_dispatch:
permissions:
contents: read
packages: write
jobs:
deploy:
if: "success() && startsWith(github.ref, 'refs/tags/')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: check tag
id: check-tag
run: python check_tag.py
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@v1.8.3
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Build Lambda layer
run: |
pip install --target=python .
- uses: actions/upload-artifact@v3
with:
name: lambda-layer
path: ./python
publish-images:
runs-on: ubuntu-latest
needs: deploy
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- name: Log in to container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Copy logging.conf
run: |
mkdir -p ./containers/base
cp ./pyatlan/logging.conf ./containers/base/
- name: Set image tag from file
id: set-image-tag
run: |
TAG=$(cat pyatlan/version.txt)
echo "IMAGE_TAG=$TAG" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v4
with:
push: true
tags: ghcr.io/atlanhq/atlan-python:${{ env.IMAGE_TAG }}
context: ./containers
file: ./containers/Dockerfile
build-args: VERSION=${{ env.IMAGE_TAG }}