mirror of
https://github.com/harivansh-afk/betterNAS.git
synced 2026-04-15 13:03:43 +00:00
Add install script, CI workflows, and release pipeline
- Install script: curl-pipe-sh installer that downloads the right binary for the user's OS/arch from GitHub Releases - CI workflow: runs go vet + go test for both Go modules and builds the web app on push/PR - Release workflow: goreleaser builds cross-platform binaries (linux/darwin, amd64/arm64) on version tags - Node-agent defaults BETTERNAS_CONTROL_PLANE_URL to https://api.betternas.com so users only need username/password
This commit is contained in:
parent
1bbfb6647d
commit
18b4ce1a40
6 changed files with 178 additions and 8 deletions
47
.github/workflows/ci.yaml
vendored
Normal file
47
.github/workflows/ci.yaml
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
test-control-plane:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: apps/control-plane/go.mod
|
||||
cache-dependency-path: apps/control-plane/go.sum
|
||||
- run: go vet ./...
|
||||
working-directory: apps/control-plane
|
||||
- run: go test -count=1 ./...
|
||||
working-directory: apps/control-plane
|
||||
|
||||
test-node-agent:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: apps/node-agent/go.mod
|
||||
cache-dependency-path: apps/node-agent/go.sum
|
||||
- run: go vet ./...
|
||||
working-directory: apps/node-agent
|
||||
- run: go test -count=1 ./...
|
||||
working-directory: apps/node-agent
|
||||
|
||||
build-web:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: pnpm/action-setup@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
cache: pnpm
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- run: pnpm --filter @betternas/web build
|
||||
env:
|
||||
NEXT_PUBLIC_BETTERNAS_API_URL: https://api.betternas.com
|
||||
27
.github/workflows/release.yaml
vendored
Normal file
27
.github/workflows/release.yaml
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: apps/node-agent/go.mod
|
||||
cache-dependency-path: apps/node-agent/go.sum
|
||||
- uses: goreleaser/goreleaser-action@v6
|
||||
with:
|
||||
version: latest
|
||||
args: release --clean
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue