From a067a8b987669d2233c4e0176f666dc79b3fe9c1 Mon Sep 17 00:00:00 2001 From: Matthieu Pignolet Date: Sat, 18 Jan 2025 19:27:01 +0400 Subject: add CI --- .github/workflows/deb.yml | 23 +++++++++++++++++++++++ build.sh | 6 ++++++ 2 files changed, 29 insertions(+) create mode 100644 .github/workflows/deb.yml create mode 100755 build.sh diff --git a/.github/workflows/deb.yml b/.github/workflows/deb.yml new file mode 100644 index 0000000..57e151f --- /dev/null +++ b/.github/workflows/deb.yml @@ -0,0 +1,23 @@ +name: Release + +on: + push: + tags: + - '*' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.3' # Not needed with a .ruby-version file + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - run: gem install fpm + - run: ./build.sh + - uses: actions/upload-artifact@v4 + with: + name: deb + path: | + *.deb \ No newline at end of file diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..c9cda77 --- /dev/null +++ b/build.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +# Permet la génération des paquets debian +TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) +VERSION="${TAG/-/"~"}" +fpm -t deb -v "$VERSION" \ No newline at end of file -- cgit v1.2.3