diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml new file mode 100644 index 000000000..a5e533ded --- /dev/null +++ b/.github/workflows/nightly-build.yml @@ -0,0 +1,30 @@ +name: Java SNAPSHOT Release + +permissions: + packages: write + +on: + workflow_dispatch: + push: + branches: + - master + schedule: + - cron: '0 1 * * *' + +jobs: + release-snapshot: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 21 + cache: maven + + - name: Build and Publish SNAPSHOT + run: ./mvnw deploy -B -V -D"maven.javadoc.skip"="true" -D"java.util.logging.config.file"="${{github.workspace}}/quickfixj-core/src/test/resources/logging.properties" -D"http.keepAlive"="false" -D"maven.wagon.http.pool"="false" -D"maven.wagon.httpconnectionManager.ttlSeconds"="120" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index 3143d2f2b..32edb154c 100644 --- a/README.md +++ b/README.md @@ -320,3 +320,71 @@ Many integrations require specialisation of the FIX Messages, Components and/or ![image info](./src/main/puml/custom_dependencies.png) ![image info](./src/main/puml/custom_dependencies_fixt11_fixlatest.png) + +### Using SNAPSHOTs + +The nightly SNAPSHOT releases are available on **GitHub Packages**. +GitHub Packages requires authentication - even for public repositories. +You need to use a [Personal Access Token (PAT)](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) +with `read:packages` permission. + +#### Maven Setup: + +Add the authentication part to your `settings.xml` file in `servers`: + +```xml + + + + github-quickfixj + USERNAME + GITHUB_PAT + + +``` + +Add the GitHub Packages repository in `repositories` and the desired `SNAPSHOT` version in `dependencies`: + +```xml + + + + github-quickfixj + GitHub Packages for quickfixj + https://maven.pkg.github.com/quickfix-j/quickfixj + + true + + + + + + + + + + org.quickfixj + quickfixj-all + 3.0.0-SNAPSHOT + + + + +``` + +#### Gradle Setup (groovy): + +Add the following to your `build.gradle` file: + +```groovy +//build.gradle +repositories { + maven { + url = uri("https://maven.pkg.github.com/quickfix-j/quickfixj") + credentials { + username = "USERNAME" // Your GitHub username + password = "GITHUB_PAT" // Your GitHub PAT + } + } +} +``` diff --git a/pom.xml b/pom.xml index 7c9ee1c26..4eab1eb33 100644 --- a/pom.xml +++ b/pom.xml @@ -605,8 +605,9 @@ - ossrh - https://oss.sonatype.org/content/repositories/snapshots + github + GitHub Packages - Snapshots + https://maven.pkg.github.com/quickfix-j/quickfixj ossrh