From 68a6b99b8590af771dff4332556e381a61fc9238 Mon Sep 17 00:00:00 2001 From: Andy Bunce Date: Wed, 12 Feb 2025 15:26:51 +0000 Subject: [PATCH] [mod] use action --- .gitea/workflows/ci-basex.yaml | 26 +++++------------------ .gitea/workflows/test-basex.yaml | 2 +- .gitea/workflows/trigger/release | 2 +- .github/actions/install-basex/action.yaml | 6 +----- 4 files changed, 8 insertions(+), 28 deletions(-) diff --git a/.gitea/workflows/ci-basex.yaml b/.gitea/workflows/ci-basex.yaml index 5a62c26..dc77803 100644 --- a/.gitea/workflows/ci-basex.yaml +++ b/.gitea/workflows/ci-basex.yaml @@ -18,32 +18,16 @@ jobs: distribution: "temurin" java-version: "17" - - name: Download BaseX - run: | - BASEX_VERSION="10.7" # Example version (adjust as needed) - # Remove dots from version for filename (e.g., "11.7" → "117") "9.7.4","10.7" - BASEX_CLEAN_VERSION="${BASEX_VERSION//./}" - wget https://files.basex.org/releases/$BASEX_VERSION/BaseX$BASEX_CLEAN_VERSION.zip -O BaseX.zip - - - name: Unzip BaseX - run: | - unzip BaseX.zip -d $HOME - rm BaseX.zip - - - name: Add BaseX to PATH - run: | - echo "BASEX_ROOT=$HOME/basex" >> $GITHUB_ENV - echo "PATH=$PATH:$HOME/basex/bin" >> $GITHUB_ENV - - - name: Verify BaseX installation - run: | - basex -c "SHOW OPTIONS" - - name: Checkout repository uses: actions/checkout@v4 with: ref: main + - name: Install BaseX + uses: ./.github/actions/install-basex + with: + basex-version: '11.7' # Specify the BaseX version here + - name: Build package run: | basex scripts/make-xar.xq diff --git a/.gitea/workflows/test-basex.yaml b/.gitea/workflows/test-basex.yaml index 0acba76..aa50ab9 100644 --- a/.gitea/workflows/test-basex.yaml +++ b/.gitea/workflows/test-basex.yaml @@ -30,4 +30,4 @@ jobs: - name: Run BaseX command run: | - basex 2+2 \ No newline at end of file + basex "2+2" \ No newline at end of file diff --git a/.gitea/workflows/trigger/release b/.gitea/workflows/trigger/release index 5b2cd0d..47505de 100644 --- a/.gitea/workflows/trigger/release +++ b/.gitea/workflows/trigger/release @@ -5,4 +5,4 @@ Xyxh 4456 9.7.4 xyxz01x ab -iiiisAa \ No newline at end of file +iiiisAas \ No newline at end of file diff --git a/.github/actions/install-basex/action.yaml b/.github/actions/install-basex/action.yaml index 072c1b0..e0004b9 100644 --- a/.github/actions/install-basex/action.yaml +++ b/.github/actions/install-basex/action.yaml @@ -18,20 +18,16 @@ runs: - name: Unzip BaseX shell: bash run: | - unzip BaseX.zip -d $HOME - echo "rm" + unzip BaseX.zip -d $HOME rm BaseX.zip - echo "done" - name: Add BaseX to PATH shell: bash run: | - set -x # Enable debugging echo "BASEX_ROOT=$HOME/basex" >> $GITHUB_ENV echo "PATH=$PATH:$HOME/basex/bin" >> $GITHUB_ENV - name: Verify BaseX installation shell: bash run: | - set -x # Enable debugging basex "declare option output:indent 'yes';db:system()"