From 08001c22811af34df4f07e62202179d787bdd3f2 Mon Sep 17 00:00:00 2001 From: obvtiger Date: Fri, 25 Apr 2025 09:47:02 +0200 Subject: [PATCH 1/6] Update .github/workflows/build.yml --- .github/workflows/build.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8fc3827..3f11c66 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,11 +11,9 @@ jobs: runs-on: ubuntu-24.04 steps: - name: checkout repository - uses: actions/checkout@v4 - - name: validate gradle wrapper - uses: gradle/actions/wrapper-validation@v4 + uses: https://git.eplg.services/actions/checkout@v4 - name: setup jdk - uses: actions/setup-java@v4 + uses: https://git.eplg.services/actions/setup-java@v4 with: java-version: '21' distribution: 'microsoft' @@ -24,7 +22,7 @@ jobs: - name: build run: ./gradlew build - name: capture build artifacts - uses: actions/upload-artifact@v4 + uses: https://git.eplg.services/actions/upload-artifact@v4 with: name: Artifacts path: build/libs/ \ No newline at end of file -- 2.47.2 From 7d14dffae1a4bf2f37270e6d3141c78e9bb819f1 Mon Sep 17 00:00:00 2001 From: obvtiger Date: Fri, 25 Apr 2025 09:47:58 +0200 Subject: [PATCH 2/6] Update .github/workflows/build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3f11c66..a20560c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,7 @@ on: [pull_request, push] jobs: build: - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest steps: - name: checkout repository uses: https://git.eplg.services/actions/checkout@v4 -- 2.47.2 From e99bab37b73efa9e9c540fa044802dbbff7fef74 Mon Sep 17 00:00:00 2001 From: obvtiger Date: Fri, 25 Apr 2025 09:54:15 +0200 Subject: [PATCH 3/6] Update .github/workflows/build.yml --- .github/workflows/build.yml | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a20560c..a72075c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,8 +21,29 @@ jobs: run: chmod +x ./gradlew - name: build run: ./gradlew build - - name: capture build artifacts - uses: https://git.eplg.services/actions/upload-artifact@v4 + - name: Generate release tag + if: github.ref == 'refs/heads/master' + id: tag + run: | + echo "RELEASE_TAG=build-$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV + - name: Create artifact archive + if: github.ref == 'refs/heads/master' + run: | + mkdir -p release-files + cd target + find . -name "*.jar" -o -name "*.war" -o -name "*.zip" | xargs -I{} cp {} ../release-files/ + cd .. + echo "Build completed on $(date)" > release-files/build-info.txt + echo "Git commit: ${{ github.sha }}" >> release-files/build-info.txt + tar -czvf coreprotect-build.tar.gz -C release-files . + mkdir -p release + mv coreprotect-build.tar.gz release/ + - name: Publish to Forgejo Releases + if: github.ref == 'refs/heads/master' + uses: https://git.eplg.services/actions/forgejo-release@v2.6.0 with: - name: Artifacts - path: build/libs/ \ No newline at end of file + direction: upload + tag: ${{ env.RELEASE_TAG }} + release-dir: release + release-notes: "Automated build from master branch" + override: true \ No newline at end of file -- 2.47.2 From cbc5c081353ffc064147f5b6820a4050c382e383 Mon Sep 17 00:00:00 2001 From: obvtiger Date: Sat, 26 Apr 2025 02:17:06 +0200 Subject: [PATCH 4/6] Update .github/workflows/build.yml --- .github/workflows/build.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a72075c..94f2ce4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,6 +17,8 @@ jobs: with: java-version: '21' distribution: 'microsoft' + - name: imfall + run: apt update && apt install tree -y - name: make gradle wrapper executable run: chmod +x ./gradlew - name: build @@ -29,13 +31,13 @@ jobs: - name: Create artifact archive if: github.ref == 'refs/heads/master' run: | + tree mkdir -p release-files - cd target find . -name "*.jar" -o -name "*.war" -o -name "*.zip" | xargs -I{} cp {} ../release-files/ cd .. echo "Build completed on $(date)" > release-files/build-info.txt echo "Git commit: ${{ github.sha }}" >> release-files/build-info.txt - tar -czvf coreprotect-build.tar.gz -C release-files . + tar -czvf dacliente-build.tar.gz -C release-files . mkdir -p release mv coreprotect-build.tar.gz release/ - name: Publish to Forgejo Releases -- 2.47.2 From 081354ae9af9a7e96225822b28619054fac6bffd Mon Sep 17 00:00:00 2001 From: obvtiger Date: Sat, 26 Apr 2025 02:22:38 +0200 Subject: [PATCH 5/6] Update .github/workflows/build.yml --- .github/workflows/build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 94f2ce4..60bb55a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,8 +33,9 @@ jobs: run: | tree mkdir -p release-files - find . -name "*.jar" -o -name "*.war" -o -name "*.zip" | xargs -I{} cp {} ../release-files/ - cd .. + cd build/libs/ + find . -name "*.jar" -o -name "*.war" -o -name "*.zip" | xargs -I{} cp {} ../../release-files/ + cd ../../ echo "Build completed on $(date)" > release-files/build-info.txt echo "Git commit: ${{ github.sha }}" >> release-files/build-info.txt tar -czvf dacliente-build.tar.gz -C release-files . -- 2.47.2 From 32656e17da4bc6f9aec1f2584ad9085fcf58e354 Mon Sep 17 00:00:00 2001 From: obvtiger Date: Sat, 26 Apr 2025 02:27:05 +0200 Subject: [PATCH 6/6] Update .github/workflows/build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 60bb55a..e7a316e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,7 +40,7 @@ jobs: echo "Git commit: ${{ github.sha }}" >> release-files/build-info.txt tar -czvf dacliente-build.tar.gz -C release-files . mkdir -p release - mv coreprotect-build.tar.gz release/ + mv dacliente-build.tar.gz release/ - name: Publish to Forgejo Releases if: github.ref == 'refs/heads/master' uses: https://git.eplg.services/actions/forgejo-release@v2.6.0 -- 2.47.2