From 40adfcba556f6bc6982cdafdfc16647842fd811a Mon Sep 17 00:00:00 2001 From: duncdrum Date: Thu, 2 Jan 2025 11:56:38 +0100 Subject: [PATCH 1/2] [feature] gh package snapshots... from CI (hopefully) --- .../{ci-deploy.yml => ci-container.yml} | 6 +- .github/workflows/ci-snapshots.yml | 30 +++++++++ exist-parent/pom.xml | 61 +++++++++++++------ 3 files changed, 77 insertions(+), 20 deletions(-) rename .github/workflows/{ci-deploy.yml => ci-container.yml} (98%) create mode 100644 .github/workflows/ci-snapshots.yml diff --git a/.github/workflows/ci-deploy.yml b/.github/workflows/ci-container.yml similarity index 98% rename from .github/workflows/ci-deploy.yml rename to .github/workflows/ci-container.yml index a81af4f361c..21b41b67390 100644 --- a/.github/workflows/ci-deploy.yml +++ b/.github/workflows/ci-container.yml @@ -1,8 +1,8 @@ -name: Deploy +name: Publish Container on: [push, pull_request] jobs: build: - name: Build and Test Images + name: Test and Publish Container Images runs-on: ubuntu-latest # NOTE (DP): Publish on develop and master, test on PRs against these # TODO(DP) Reinstate CRONed release builds to update stock apps regularly @@ -77,4 +77,4 @@ jobs: # DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} # run: mvn -q -Ddocker.tag=experimental -Ddocker.username=$DOCKER_USERNAME -Ddocker.password=$DOCKER_PASSWORD docker:build docker:push # working-directory: ./exist-docker - + diff --git a/.github/workflows/ci-snapshots.yml b/.github/workflows/ci-snapshots.yml new file mode 100644 index 00000000000..31b6df8bb02 --- /dev/null +++ b/.github/workflows/ci-snapshots.yml @@ -0,0 +1,30 @@ +name: Publish Snaphots to Github Packages + +on: + push: + branches: + - develop + workflow_dispatch: # Allow manual triggering + +jobs: + publish-snapshots: + name: Deploy Snapshots + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/develop' + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 1 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + distribution: liberica + java-version: '17' + - name: Cache Maven packages + uses: actions/cache@v4 + with: + path: ~/.m2 + key: deploy-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: deploy-${{ runner.os }}-maven + - name: Deploy SNAPSHOT maven artefacts + run: mvn -V -B -q -DskipTests -Ddependency-check.skip=true -P !mac-dmg-on-unix,!installer,!concurrency-stress-tests,!micro-benchmarks,skip-build-dist-archives clean deploy diff --git a/exist-parent/pom.xml b/exist-parent/pom.xml index f9d764d94ec..21073e3b263 100644 --- a/exist-parent/pom.xml +++ b/exist-parent/pom.xml @@ -1177,17 +1177,28 @@ - - exist-db-snapshots - Evolved Binary - eXist-db Snapshots - https://repo.evolvedbinary.com/repository/exist-db-snapshots/ - - false - - - true - - + + github + GitHub Registry for Snapshots + https://maven.pkg.github.com/eXist-db/exist + + false + + + true + + + + + + + + + + + + + exist-db Evolved Binary - eXist-db Releases @@ -1217,10 +1228,21 @@ false + + + + + + + + + + + - exist-db-snapshots - Evolved Binary - eXist-db Snapshots - https://repo.evolvedbinary.com/repository/exist-db-snapshots/ + github + GitHub Registry for Snapshots + https://maven.pkg.github.com/eXist-db/exist false @@ -1232,10 +1254,15 @@ - exist-db-snapshots - Evolved Binary - eXist-db Snapshots - https://repo.evolvedbinary.com/repository/exist-db-snapshots/ + github + GitHub Registry for Snapshots + https://maven.pkg.github.com/eXist-db/exist + + + + + sonatype-nexus-staging Nexus Release Repository From 53aef8e86d3e4e9cd80e008c74bc97d7a5b86848 Mon Sep 17 00:00:00 2001 From: duncdrum Date: Fri, 3 Jan 2025 10:15:12 +0100 Subject: [PATCH 2/2] [bugfix] address review --- exist-parent/pom.xml | 49 ++++++++++++++++++++------------------------ 1 file changed, 22 insertions(+), 27 deletions(-) diff --git a/exist-parent/pom.xml b/exist-parent/pom.xml index 21073e3b263..9b8b6635812 100644 --- a/exist-parent/pom.xml +++ b/exist-parent/pom.xml @@ -1188,17 +1188,17 @@ true - - - - - - - - - - - + + exist-db-snapshots + Evolved Binary - eXist-db Snapshots + https://repo.evolvedbinary.com/repository/exist-db-snapshots/ + + false + + + true + + exist-db Evolved Binary - eXist-db Releases @@ -1228,17 +1228,17 @@ false - - - - - - - - - - - + + exist-db-snapshots + Evolved Binary - eXist-db Snapshots + https://repo.evolvedbinary.com/repository/exist-db-snapshots/ + + false + + + true + + github GitHub Registry for Snapshots @@ -1258,11 +1258,6 @@ GitHub Registry for Snapshots https://maven.pkg.github.com/eXist-db/exist - - - - - sonatype-nexus-staging Nexus Release Repository