Files
nextcloud-samba-sync/.gitea/workflows/ci.yml
bartfaik04 1430508121
Some checks failed
CI / build (push) Successful in 10s
CI / release (push) Failing after 8s
Checkout in release job
2025-06-07 11:57:17 +02:00

76 lines
1.7 KiB
YAML

name: CI
on:
push:
tags:
- '*' # Triggers on all tags
branches:
- '**' # Triggers on all branches
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
release:
if: startsWith(github.ref, 'refs/tags/')
needs: build
runs-on: ubuntu
container:
image: node:20
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install build tools
run: apt update && apt install -y zip
- name: Download compiled binary
uses: actions/download-artifact@v3
with:
name: ncsambawatcher
- name: Copy files
run: |
mkdir build
cp ncsambawatcher build/ncsambawatcher
cp configs/ncsambawatcher.config.default build/ncsambawatcher.config
cp configs/ncsambawatcher.service.default build/ncsambawatcher.service
cp init.sh build/init.sh
- name: Create release zip
run: |
cd build
zip ../ncsambawatcher.zip ./*
- name: Publish release
uses: actions/create-release@v1
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: Release ${{ github.ref_name }}
files: |
ncsambawatcher.zip