This is an automated email from the ASF dual-hosted git repository. jacques pushed a commit to branch build-test in repository https://gitbox.apache.org/repos/asf/calcite.git
commit b9e7d6944c8db912c071dcced9efad4371b9913f Author: Jacques Nadeau <[email protected]> AuthorDate: Sat Dec 11 10:24:21 2021 -0800 [CALCITE-4934] Deploy snapshots releases on master merge --- .github/workflows/publish-snapshot.yml | 38 ++++++++++++++++++++++++++++++++++ build.gradle.kts | 12 +++++++++++ 2 files changed, 50 insertions(+) diff --git a/.github/workflows/publish-snapshot.yml b/.github/workflows/publish-snapshot.yml new file mode 100644 index 0000000..82a6699 --- /dev/null +++ b/.github/workflows/publish-snapshot.yml @@ -0,0 +1,38 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +name: "Publish Snapshot to Maven" +on: + push: + branches: [ master, build-test ] + +jobs: + publish-snapshot: + if: github.repository_owner == 'apache' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + # we need to fetch all tags so that getProjectVersion() in build.gradle correctly determines the next SNAPSHOT version from the newest tag + fetch-depth: 0 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: | + ./gradlew publishCalcitePublicationToApacheSnapshotRepository -PnexusSnapshotUser=${{ secrets.NEXUS_USER }} -PnexusSnapshotPassword=${{ secrets.NEXUS_PW }} diff --git a/build.gradle.kts b/build.gradle.kts index cf40a12..9f64bf5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -806,6 +806,18 @@ allprojects { // Do not publish "root" project. Java plugin is applied here for DSL purposes only return@configure } + + repositories { + maven { + name = "ApacheSnapshot" // optional target repository name + url = uri("https://repository.apache.org/content/repositories/snapshots") + credentials { + username = (project.properties["nexusSnapshotUser"] ?: "").toString() + password = (project.properties["nexusSnapshotPassword"] ?: "").toString() + } + } + } + if (!project.props.bool("nexus.publish", default = true)) { // Some of the artifacts do not need to be published return@configure
