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