From 57e84c35b5dfd2aaa4822d5e8119a71880634d3a Mon Sep 17 00:00:00 2001 From: pavel Date: Thu, 5 Feb 2026 23:10:00 +0100 Subject: [PATCH] pipeline --- .forgejo/workflows/pipeline.yaml | 24 ++++++++++++++++++++++++ build.gradle.kts | 9 +++++++++ gradlew | 0 3 files changed, 33 insertions(+) create mode 100644 .forgejo/workflows/pipeline.yaml mode change 100644 => 100755 gradlew diff --git a/.forgejo/workflows/pipeline.yaml b/.forgejo/workflows/pipeline.yaml new file mode 100644 index 0000000..dd4e1a6 --- /dev/null +++ b/.forgejo/workflows/pipeline.yaml @@ -0,0 +1,24 @@ +on: + release: + types: [published] +jobs: + upload: + runs-on: host + permissions: + packages: write + steps: + - uses: actions/setup-node@v6 + with: + node-version: 24 + - uses: actions/checkout@v6 + - run: ./gradlew buildFatJar + - run: | + curl -X POST \ + -H "Authorization: token ${{ github.token }}" \ + -F "attachment=@build/libs/todo-all.jar" \ + "${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases/${{ github.event.release.id }}/assets" + - run: | + export XDG_RUNTIME_DIR=/run/user/$(id -u) + export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus + cp build/libs/todo-all.jar ~/todo/app.jar + systemctl --user restart todo \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 2586bcf..e3ae9d0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -29,6 +29,15 @@ buildscript { } } +tasks { + shadowJar { + mergeServiceFiles { + include("META-INF/services/**") + duplicatesStrategy = DuplicatesStrategy.INCLUDE + } + } +} + dependencies { implementation("io.ktor:ktor-server-core") implementation("io.ktor:ktor-server-content-negotiation") diff --git a/gradlew b/gradlew old mode 100644 new mode 100755