🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org
Python agentai-societiesartificial-intelligencecommunicative-aicooperative-aideep-learninglarge-language-modelsmulti-agent-systemsnatural-language-processing
chore: refine CICD of publishing (#1040)
Isaac Jin14abef7cf0fa
diff --git a/.github/workflows/publish_docker_image.yml b/.github/workflows/publish_docker_image.ymldeleted file mode 100644index d553babde..000000000--- a/.github/workflows/publish_docker_image.yml+++ /dev/null@@ -1,31 +0,0 @@-name: Publish Docker Image--on:- release:- types: [ published ]--jobs:- build-and-push:- runs-on: ubuntu-latest-- steps:- - name: Checkout code- uses: actions/checkout@v3-- - name: Set up Docker Buildx- uses: docker/setup-buildx-action@v3-- - name: Log in to GHCR- uses: docker/login-action@v3- with:- registry: ghcr.io- username: ${{ github.actor }}- password: ${{ secrets.GHCR_PACKAGE_PAT }}-- - name: Build and push Docker image- run: |- docker buildx build --platform linux/amd64,linux/arm64 \- --tag ghcr.io/camel-ai/camel:${{ github.ref_name }} \- --sbom=false --provenance=false \- --file .container/minimal_build/Dockerfile \- --push .diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.ymlindex 12adc1d5a..5892e93d9 100644--- a/.github/workflows/publish_release.yml+++ b/.github/workflows/publish_release.yml@@ -1,4 +1,4 @@-name: Publish camel to PyPI / GitHub+name: Publish CAMEL to PyPI / GitHubon:push:@@ -8,43 +8,78 @@ on:workflow_dispatch:jobs:- build-n-publish:+ build-and-publish-pypi:name: Build and publish to PyPIruns-on: ubuntu-latestpermissions:contents: writesteps:- - uses: actions/checkout@v3- - name: Build and publish to pypi+ - name: Checkout code+ uses: actions/checkout@v4++ - name: Build and publish to PyPIuses: JRubics/[email protected]with:pypi_token: ${{ secrets.PYPI_API_KEY }}ignore_dev_requirements: "yes"- - name: Create GitHub Release- id: create_release- uses: actions/create-release@v1- env:- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token- with:- tag_name: ${{ github.ref }}- release_name: ${{ github.ref }}- draft: false- prerelease: false+ create-release:+ name: Create GitHub Release+ runs-on: ubuntu-latest+ permissions:+ contents: write+ steps:+ - name: Checkout code+ uses: actions/checkout@v4- name: Get Asset namerun: |export PKG=$(ls dist/ | grep tar)set -- $PKGecho "name=$1" >> $GITHUB_ENV- - name: Upload Release Asset (sdist) to GitHub- id: upload-release-asset- uses: actions/upload-release-asset@v1- env:- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}++ - name: Release to GitHub+ uses: softprops/action-gh-release@v2+ with:+ generate_release_notes: true+ draft: false+ prerelease: false+ files: |+ dist/${{ env.name }}++ 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@v5with:- upload_url: ${{ steps.create_release.outputs.upload_url }}- asset_path: dist/${{ env.name }}- asset_name: ${{ env.name }}- asset_content_type: application/zip+ 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 }}