Skip to content

Build & publish module to registry #7

Build & publish module to registry

Build & publish module to registry #7

Workflow file for this run

name: Build & publish module to registry
on:
release:
types:
- released
workflow_dispatch:
jobs:
publish:
strategy:
matrix:
include:
- platform: linux/amd64
runner: ubuntu-latest
target_os: linux
target_arch: amd64
docker_image: ghcr.io/viamrobotics/antique2:amd64-cache
- platform: linux/arm64
runner: buildjet-8vcpu-ubuntu-2204-arm
target_os: linux
target_arch: arm64
docker_image: ghcr.io/viamrobotics/antique2:arm64-cache
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- name: Pull Docker image
run: docker pull ${{ matrix.docker_image }}
shell: bash
- name: Build and package using Docker
run: |
docker run \
-e TARGET_OS=${{ matrix.target_os }} \
-e TARGET_ARCH=${{ matrix.target_arch }} \
-v "${{ github.workspace }}:/workspace" \
-w /workspace \
${{ matrix.docker_image }} \
sh -c "./scripts/setup.sh && make module.tar.gz"
shell: bash
- name: Verify module.tar.gz exists recursively
run: |
if find . -name module.tar.gz | grep -q .; then
echo "module.tar.gz exists"
else
echo "module.tar.gz does not exist"
exit 1
fi
shell: bash
- name: Upload claw-game webserver module to registry
uses: viamrobotics/upload-module@v1
with:
meta-path: meta.json
module-path: module.tar.gz
platform: ${{ matrix.platform }}
version: ${{ github.ref_name }}
key-id: ${{ secrets.viam_key_id }}
key-value: ${{ secrets.viam_key_value }}
do-update: false