Skip to content

feat: support InputFileType.Json and InputFileType.Dict (#2165) #129

feat: support InputFileType.Json and InputFileType.Dict (#2165)

feat: support InputFileType.Json and InputFileType.Dict (#2165) #129

Workflow file for this run

name: Publish
on:
push:
tags:
- '**'
jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI
if: "success() && startsWith(github.ref, 'refs/tags/')"
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cache/pypoetry
~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Build publish
run: |
python -m pip install poetry poetry-dynamic-versioning
poetry install
poetry build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_password }}
push_to_registry:
name: Push Docker image to Docker Hub
if: "success() && startsWith(github.ref, 'refs/tags/')"
runs-on: ubuntu-24.04
needs: build-n-publish
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with:
images: koxudaxi/datamodel-code-generator
tag-semver: |
{{raw}}
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build and push
uses: docker/build-push-action@v2
with:
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
build-args: |
VERSION=${{ github.ref_name }}
platforms: linux/amd64,linux/arm64