From 98f3cfa8e554a5edbee3bc2b38cef9b76bbf9d1d Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Thu, 10 Apr 2025 13:07:02 +0200 Subject: added build workflow --- .github/workflows/ant-build.yaml | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/ant-build.yaml (limited to '.github') diff --git a/.github/workflows/ant-build.yaml b/.github/workflows/ant-build.yaml new file mode 100644 index 000000000..0ef7f1b7c --- /dev/null +++ b/.github/workflows/ant-build.yaml @@ -0,0 +1,41 @@ +name: YaCy CI/CD Pipeline + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + workflow_dispatch: + +jobs: + build-and-test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + + - name: Install build dependencies + run: | + sudo apt-get update + sudo apt-get install -yq ant git wkhtmltopdf imagemagick xvfb ghostscript + + - name: Build with Ant + run: | + ant compile -f build.xml + git rev-parse HEAD > .git/shallow + git tag -l | xargs git tag -d + git gc --prune=now + + - name: Configure runtime settings + run: | + sed -i "/adminAccountBase64MD5=/c\adminAccountBase64MD5=MD5:8cffbc0d66567a0987a4aba1ec46d63c" defaults/yacy.init + sed -i "/adminAccountForLocalhost=/c\adminAccountForLocalhost=false" defaults/yacy.init + sed -i "/server.https=false/c\server.https=true" defaults/yacy.init -- cgit v1.2.3 From 24e5c17ce4c2f219e6deae5ab77b65159c2a968a Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Thu, 10 Apr 2025 13:19:01 +0200 Subject: added release production in github --- .github/workflows/ant-build.yaml | 40 +++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) (limited to '.github') diff --git a/.github/workflows/ant-build.yaml b/.github/workflows/ant-build.yaml index 0ef7f1b7c..eba9ab517 100644 --- a/.github/workflows/ant-build.yaml +++ b/.github/workflows/ant-build.yaml @@ -8,13 +8,15 @@ on: workflow_dispatch: jobs: - build-and-test: + build-and-release: runs-on: ubuntu-latest + env: + RELEASE_DIR: RELEASE steps: - uses: actions/checkout@v4 with: - fetch-depth: 0 + fetch-depth: 0 # Required for git version info in build - name: Set up JDK 11 uses: actions/setup-java@v3 @@ -27,15 +29,35 @@ jobs: sudo apt-get update sudo apt-get install -yq ant git wkhtmltopdf imagemagick xvfb ghostscript - - name: Build with Ant - run: | - ant compile -f build.xml - git rev-parse HEAD > .git/shallow - git tag -l | xargs git tag -d - git gc --prune=now - - name: Configure runtime settings run: | sed -i "/adminAccountBase64MD5=/c\adminAccountBase64MD5=MD5:8cffbc0d66567a0987a4aba1ec46d63c" defaults/yacy.init sed -i "/adminAccountForLocalhost=/c\adminAccountForLocalhost=false" defaults/yacy.init sed -i "/server.https=false/c\server.https=true" defaults/yacy.init + + - name: Build with Ant + run: ant clean all dist + + - name: Verify tarball creation + run: | + ls -la ${{ env.RELEASE_DIR }}/ + tar -ztvf ${{ env.RELEASE_DIR }}/yacy_*.tar.gz | head + + - name: Upload build artifact + uses: actions/upload-artifact@v3 + with: + name: yacy-release + path: ${{ env.RELEASE_DIR }}/yacy_*.tar.gz + retention-days: 5 + + - name: Create GitHub Release (on tag) + if: startsWith(github.ref, 'refs/tags/v') + uses: softprops/action-gh-release@v1 + with: + files: ${{ env.RELEASE_DIR }}/yacy_*.tar.gz + body: | + YaCy Search Server Release + Built from ${{ github.sha }} + Version: ${{ github.ref_name }} + draft: false + prerelease: false -- cgit v1.2.3 From 8885fa15229aaccfe099cf3d1dcc8f204c5fee9a Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Thu, 10 Apr 2025 13:25:02 +0200 Subject: upload-artifact@v3 -> upload-artifact@v4 --- .github/workflows/ant-build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/ant-build.yaml b/.github/workflows/ant-build.yaml index eba9ab517..35cb574c9 100644 --- a/.github/workflows/ant-build.yaml +++ b/.github/workflows/ant-build.yaml @@ -44,7 +44,7 @@ jobs: tar -ztvf ${{ env.RELEASE_DIR }}/yacy_*.tar.gz | head - name: Upload build artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: yacy-release path: ${{ env.RELEASE_DIR }}/yacy_*.tar.gz -- cgit v1.2.3