summaryrefslogtreecommitdiff
path: root/.github/workflows/ant-build.yaml
blob: 9a8a0f6fba6176497183bd4f72f77d9d47b59fb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: YaCy CI/CD Pipeline

on:
  push:
    branches: [ "master" ]
  pull_request:
    branches: [ "master" ]
  workflow_dispatch:

jobs:
  build-and-release:
    runs-on: ubuntu-latest
    env:
      RELEASE_DIR: RELEASE

    steps:
    - uses: actions/checkout@v4
      with:
        fetch-depth: 0  # Required for git version info in build

    - name: Set up JDK 17
      uses: actions/setup-java@v3
      with:
        java-version: '17'
        distribution: 'temurin'

    - name: Install build dependencies
      run: |
        sudo apt-get update
        sudo apt-get install -yq ant git

    - 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 Solr and Jetty dependency isolation
      run: ./test/jetty-solr-dependency-guard.sh

    - name: Test embedded Solr bridge
      run: ./test/solr9-jetty-bridge-spike.sh

    - 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@v4
      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