Update Dockerfile #43
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Publish Package | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- 'v*.*.*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build and push multi-platform Docker image | |
run: | | |
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t your-image-name --push . | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install build twine | |
- name: Build and publish package | |
run: | | |
python -m build | |
python -m twine upload dist/* | |
env: | |
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} |