add release build stuff

This commit is contained in:
James Ravenscroft 2023-04-14 07:33:41 +01:00
parent 99590c678d
commit 11fe60f7c6
2 changed files with 31 additions and 20 deletions

View File

@ -42,18 +42,17 @@ jobs:
- name: Prepare Release - name: Prepare Release
run: | run: |
zip /${{github.workspace}}/ggml/build/bin/build_${RUNNER_OS}_${RUNNER_ARCH}.zip \ cd /${{github.workspace}}/ggml/build/bin/
${{github.workspace}}/ggml/build/bin/codegen \ zip ${{github.workspace}}/ggml/build/bin/release.zip \
${{github.workspace}}/ggml/build/bin/codegen-serve \ codegen codegen-serve codegen-quantize
${{github.workspace}}/ggml/build/bin/codegen-quantize \
- name: Upload binaries to release - name: Upload binaries to release
uses: svenstaro/upload-release-action@v2 uses: svenstaro/upload-release-action@v2
with: with:
repo_token: ${{ secrets.GITHUB_TOKEN }} repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/mything file: ${{github.workspace}}/ggml/build/bin/release.zip
asset_name: mything asset_name: turbopilot-${{ runner.os }}-${{ runner.arch }}-${{ steps.short-sha.outputs.sha }}-{{ github.ref }}.zip
tag: ${{ github.ref }} tag: ${{ github.ref }}
overwrite: true overwrite: true
body: "This is my release text" body: "Turbopilot binary release"

View File

@ -10,21 +10,33 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2.7.0 uses: actions/checkout@v3
with: with:
submodules: true submodules: true
# Add support for more platforms with QEMU (optional)
- name: Publish Docker Image to GitHub Registry # https://github.com/docker/setup-qemu-action
# You may pin to the exact commit or the version. - name: Set up QEMU
# uses: TilBlechschmidt/gp-docker-action@f89287d44556dd7d24f76c799cd0795eeb352bcf uses: docker/setup-qemu-action@v2
uses: TilBlechschmidt/gp-docker-action@v0.2-alpha
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v2
with: with:
# GitHub token to push Docker image to GitHub Packages platforms: linux/amd64,linux/arm64,linux/arm68/v8
github-token: ${{ secrets.GH_TOKEN }}
# Docker Image name - name: Login to GH ContainerHub
image-name: turbopilot uses: docker/login-action@v2
# Path to the directory where the Dockerfile resides with:
dockerfile-path: . # optional, default is . registry: ghcr.io
image-tag: ${{ github.tag }} 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