name: Package builds (unstable)

on:
  push:
    branches: ["main"]
  pull_request:
    branches: ["main"]

permissions:
  contents: read
  actions: write

jobs:
  package_builds:
    #runs-on: alrest-techarohq
    runs-on: ubuntu-24.04
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
        with:
          persist-credentials: false
          fetch-tags: true
          fetch-depth: 0

      - name: build essential
        run: |
          sudo apt-get update
          sudo apt-get install -y build-essential

      - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
        with:
          node-version: "24.11.0"
      - uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
        with:
          go-version: "1.25.4"

      - name: install node deps
        run: |
          npm ci

      - name: Build Packages
        run: |
          go tool yeet

      - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
        with:
          name: packages
          path: var/*
