Skip to content

Workflow file for this run

name: Upload Python Package and Build Image
on:
release:
types: [published]
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine hatch
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
# Build docker images
# TODO: currently we don't provide official images
# -
# name: Set up QEMU
# uses: docker/setup-qemu-action@v2
# -
# name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v2
# -
# name: Login to DockerHub
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
# -
# name: Build and push image
# id: docker_build
# uses: docker/build-push-action@v4
# with:
# context: .
# file: ./docker/Dockerfile
# push: true
# tags: ${{ secrets.DOCKERHUB_USERNAME }}/sdgx:${{ github.ref_name }}
# # Build latest if release
# -
# name: Build and push release
# if: '!github.event.release.prerelease'
# id: docker_build_release
# uses: docker/build-push-action@v4
# with:
# context: .
# file: ./docker/Dockerfile
# push: true
# tags: ${{ secrets.DOCKERHUB_USERNAME }}/sdgx:latest