Skip to content

databuilder 7.5.0

databuilder 7.5.0 #139

Workflow file for this run

name: Publish Release to PyPi
on:
release:
types: [published]
jobs:
gather-info:
runs-on: ubuntu-latest
steps:
- name: Get module for release
id: module_folder
run: echo "::set-output name=module_folder::$(awk '{print $1}' <<< "${{ github.event.release.name }}")"
outputs:
module_folder: ${{ steps.module_folder.outputs.module_folder }}
push-to-pypi:
runs-on: ubuntu-latest
needs: gather-info
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Add wheel dependency
run: pip install wheel
- name: Generate dist
run: python setup.py sdist bdist_wheel
working-directory: ${{ needs.gather-info.outputs.module_folder }}
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}
packages_dir: ${{ needs.gather-info.outputs.module_folder }}/dist
build-and-publish-docker-image:
name: Build and publish docker image
needs: gather-info
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Login with docker
run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
- name: Publish to Registry for latest
if: success()
run: make build-push-image-latest
working-directory: ${{ needs.gather-info.outputs.module_folder }}
- name: Publish to Registry for version
run: make build-push-image-version
working-directory: ${{ needs.gather-info.outputs.module_folder }}