Merge 2 workflows into one
Some checks failed
CI / build (push) Successful in 10s
CI / release (push) Failing after 16s

This commit is contained in:
2025-06-07 11:23:14 +02:00
parent e98a8daad7
commit f3d93e1e46
5 changed files with 37 additions and 45 deletions

View File

@@ -1,30 +0,0 @@
name: Build
on:
push: {}
defaults:
run:
shell: bash
working-directory: .
jobs:
build:
runs-on: ubuntu
container:
image: node:20
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install tools
run: apt update && apt install -y build-essential
- name: Compile project
run: make
- name: Save build output
uses: actions/upload-artifact@v3
with:
name: ncsambawatcher
path: ./ncsambawatcher

View File

@@ -1,25 +1,48 @@
name: Release
name: CI
on:
push:
tags:
- v.*
- '*' # Triggers on all tags
branches:
- '**' # Triggers on all branches
defaults:
run:
shell: bash
working-directory: .
jobs:
release:
jobs:
build:
runs-on: ubuntu
container:
image: node:20
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install tools
run: apt update && apt install -y build-essential
- name: Compile project
run: make
- name: Save build output
uses: actions/upload-artifact@v3
with:
name: ncsambawatcher
path: ./ncsambawatcher
release:
if: startsWith(github.ref, 'refs/tags/')
needs: build
runs-on: ubuntu
container:
image: node:20
steps:
- name: Install build tools
run: apt update && apt install -y zip
- name: Download compiled binary
uses: actions/download-artifact@v3
with:
@@ -30,7 +53,8 @@ jobs:
mkdir build
cp ncsambawatcher build/ncsambawatcher
cp configs/ncsambawatcher.config.default build/ncsambawatcher.config
cp init.sh config/init.sh
cp configs/ncsambawatcher.service.default build/ncsambawatcher.service
cp init.sh build/init.sh
- name: Create release zip
run: |