diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 98a7735fa..f680bdfab 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,73 +28,13 @@ jobs: - name: Publish package distributions to PyPI uses: pypa/gh-action-pypi-publish@release/v1 - # AMD64 Docker build job - docker-build-amd64: - name: Build Docker image (AMD64) + docker-publish: + name: Build and publish Docker image runs-on: ubuntu-latest needs: pypi-publish permissions: contents: read packages: write - outputs: - digest: ${{ steps.build.outputs.digest }} - metadata: ${{ steps.meta.outputs.json }} - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Log in to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Extract metadata - id: meta - uses: docker/metadata-action@v5 - with: - images: ghcr.io/${{ github.repository }} - tags: | - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=raw,value=latest - labels: | - org.opencontainers.image.title=OpenEvolve - org.opencontainers.image.description=Open-source evolutionary coding agent - org.opencontainers.image.vendor=OpenEvolve - org.opencontainers.image.source=https://github.com/${{ github.repository }} - org.opencontainers.image.documentation=https://github.com/${{ github.repository }}#readme - org.opencontainers.image.licenses=Apache-2.0 - - - name: Build and push AMD64 - id: build - uses: docker/build-push-action@v5 - with: - context: . - platforms: linux/amd64 - push: true - tags: ${{ steps.meta.outputs.tags }}-amd64 - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha,scope=openevolve-amd64 - cache-to: type=gha,scope=openevolve-amd64,mode=max - provenance: mode=max - sbom: true - - # ARM64 Docker build job - docker-build-arm64: - name: Build Docker image (ARM64) - runs-on: ubuntu-latest - needs: pypi-publish - permissions: - contents: read - packages: write - outputs: - digest: ${{ steps.build.outputs.digest }} - metadata: ${{ steps.meta.outputs.json }} steps: - name: Checkout uses: actions/checkout@v4 @@ -129,75 +69,15 @@ jobs: org.opencontainers.image.documentation=https://github.com/${{ github.repository }}#readme org.opencontainers.image.licenses=Apache-2.0 - - name: Build and push ARM64 - id: build + - name: Build and push multi-platform Docker image uses: docker/build-push-action@v5 with: context: . - platforms: linux/arm64 + platforms: linux/amd64,linux/arm64 push: true - tags: ${{ steps.meta.outputs.tags }}-arm64 + tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha,scope=openevolve-arm64 - cache-to: type=gha,scope=openevolve-arm64,mode=max + cache-from: type=gha,scope=openevolve-multiarch + cache-to: type=gha,scope=openevolve-multiarch,mode=max provenance: mode=max - sbom: true - - # Create multi-platform manifest - docker-manifest: - name: Create multi-platform manifest - runs-on: ubuntu-latest - needs: [docker-build-amd64, docker-build-arm64] - permissions: - contents: read - packages: write - steps: - - name: Log in to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Extract metadata - id: meta - uses: docker/metadata-action@v5 - with: - images: ghcr.io/${{ github.repository }} - tags: | - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=raw,value=latest - labels: | - org.opencontainers.image.title=OpenEvolve - org.opencontainers.image.description=Open-source evolutionary coding agent - org.opencontainers.image.vendor=OpenEvolve - org.opencontainers.image.source=https://github.com/${{ github.repository }} - org.opencontainers.image.documentation=https://github.com/${{ github.repository }}#readme - org.opencontainers.image.licenses=Apache-2.0 - - - name: Create and push multi-platform manifests - run: | - # Get the tags from metadata - TAGS="${{ steps.meta.outputs.tags }}" - - # Create manifests for each tag - for tag in $TAGS; do - echo "Creating manifest for $tag" - docker manifest create $tag \ - ${tag}-amd64 \ - ${tag}-arm64 - - # Add platform annotations - docker manifest annotate $tag ${tag}-amd64 --os linux --arch amd64 - docker manifest annotate $tag ${tag}-arm64 --os linux --arch arm64 --variant v8 - - # Push the manifest - docker manifest push $tag - done - - - name: Clean up platform-specific tags - run: | - # Note: Platform-specific tags are kept for debugging purposes - # They can be manually cleaned up later if needed - echo "Platform-specific tags retained: -amd64, -arm64 suffixes" \ No newline at end of file + sbom: true \ No newline at end of file diff --git a/openevolve/_version.py b/openevolve/_version.py index cdcd05f0e..97cc3b8e3 100644 --- a/openevolve/_version.py +++ b/openevolve/_version.py @@ -1,3 +1,3 @@ """Version information for openevolve package.""" -__version__ = "0.2.5" +__version__ = "0.2.6"