From 11fe60f7c634889956db1e515b672c22560fafdf Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Fri, 14 Apr 2023 07:33:41 +0100 Subject: [PATCH] add release build stuff --- .github/workflows/build-release.yml | 13 +++++----- .github/workflows/docker-release.yml | 38 ++++++++++++++++++---------- 2 files changed, 31 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 0954a0d..824fdc7 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -42,18 +42,17 @@ jobs: - name: Prepare Release run: | - zip /${{github.workspace}}/ggml/build/bin/build_${RUNNER_OS}_${RUNNER_ARCH}.zip \ - ${{github.workspace}}/ggml/build/bin/codegen \ - ${{github.workspace}}/ggml/build/bin/codegen-serve \ - ${{github.workspace}}/ggml/build/bin/codegen-quantize \ + cd /${{github.workspace}}/ggml/build/bin/ + zip ${{github.workspace}}/ggml/build/bin/release.zip \ + codegen codegen-serve codegen-quantize - name: Upload binaries to release uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: target/release/mything - asset_name: mything + file: ${{github.workspace}}/ggml/build/bin/release.zip + asset_name: turbopilot-${{ runner.os }}-${{ runner.arch }}-${{ steps.short-sha.outputs.sha }}-{{ github.ref }}.zip tag: ${{ github.ref }} overwrite: true - body: "This is my release text" \ No newline at end of file + body: "Turbopilot binary release" \ No newline at end of file diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index ea51016..07ceac1 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -10,21 +10,33 @@ jobs: build: runs-on: ubuntu-latest steps: + - name: Checkout - uses: actions/checkout@v2.7.0 + uses: actions/checkout@v3 with: submodules: true - - - name: Publish Docker Image to GitHub Registry - # You may pin to the exact commit or the version. - # uses: TilBlechschmidt/gp-docker-action@f89287d44556dd7d24f76c799cd0795eeb352bcf - uses: TilBlechschmidt/gp-docker-action@v0.2-alpha + # Add support for more platforms with QEMU (optional) + # https://github.com/docker/setup-qemu-action + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker BuildX + uses: docker/setup-buildx-action@v2 with: - # GitHub token to push Docker image to GitHub Packages - github-token: ${{ secrets.GH_TOKEN }} - # Docker Image name - image-name: turbopilot - # Path to the directory where the Dockerfile resides - dockerfile-path: . # optional, default is . - image-tag: ${{ github.tag }} \ No newline at end of file + platforms: linux/amd64,linux/arm64,linux/arm68/v8 + + - name: Login to GH ContainerHub + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ravenscroftj + password: ${{ secrets.GH_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v4 + with: + push: true + tags: ghcr.io/ravenscroftj/turbopilot:${{ github.tag }} + context: ${{github.workspace}} + platforms: linux/amd64,linux/arm64 \ No newline at end of file