diff --git a/.github/workflows/snapshot-releases.yaml b/.github/workflows/snapshot-releases.yaml new file mode 100644 index 0000000000..3a6d70ce13 --- /dev/null +++ b/.github/workflows/snapshot-releases.yaml @@ -0,0 +1,33 @@ +name: Snapshot Releases + +on: [push] # for tests we push with every PR update +# Only run on pushes to main: +# on: +# push: +# branches: +# - main + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 8 + uses: actions/setup-java@v3 + with: + # We could consider bumping this for snapshots? + java-version: '8' + distribution: 'temurin' + server-id: ossrh + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + - name: Publish package + env: + MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} + # These don't work with java 8. + # Consider have something separate with more recent versions for the modules that don't support older versions? + included_modules: '-pl !code-execution-engines/langchain4j-code-execution-engine-graalvm-polyglot,!langchain4j-neo4j,!langchain4j-opensearch' + # Notes: + # - tests already run in a separate action + run: mvn --batch-mode deploy -DskipTests $included_modules