Skip to content

chore: update deploy and publish workflow #43

chore: update deploy and publish workflow

chore: update deploy and publish workflow #43

Workflow file for this run

name: Publish CAMEL to PyPI / GitHub
on:
push:
tags:
- "v*"
workflow_dispatch:
jobs:
build-and-publish-pypi:
name: Build and publish to PyPI
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build and publish to PyPI
uses: JRubics/[email protected]
with:
python_version: '3.10'
pypi_token: ${{ secrets.PYPI_API_KEY }}
create-release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: build-and-publish-pypi
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Release to GitHub
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
draft: false
prerelease: false
files: "dist/*"
build-and-publish-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and Push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: .container/minimal_build/Dockerfile
push: true
tags: |
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ github.ref_name }}
platforms: linux/amd64,linux/arm64
sbom: false
provenance: false
labels: |
org.opencontainers.image.source=https://github.com/${{ github.repository }}
org.opencontainers.image.revision=${{ github.sha }}