45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
name: Build & Push Package
|
|
|
|
on:
|
|
push:
|
|
branches: ["main"]
|
|
repository_dispatch:
|
|
types: [manual-run]
|
|
|
|
jobs:
|
|
package-and-push:
|
|
needs: test
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
|
container: mcr.microsoft.com/devcontainers/python:3.11
|
|
|
|
steps:
|
|
- name: Install Node (and git/make) inside container
|
|
run: |
|
|
set -eux
|
|
apt-get update
|
|
# add gcc & toolchain while keeping your originals
|
|
apt-get install -y --no-install-recommends curl ca-certificates git build-essential make
|
|
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
|
|
apt-get install -y --no-install-recommends nodejs
|
|
node -v
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Build and package
|
|
run: |
|
|
make clean
|
|
make all
|
|
python package.py
|
|
mkdir -p deploy/packages
|
|
mv chess-bundle.zip deploy/packages/
|
|
|
|
- name: Push package to registry
|
|
env:
|
|
REGISTRY_URL: ${{ secrets.REGISTRY_URL }}
|
|
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
|
|
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
|
run: ./deploy/push-to-registry.sh |