|
| 1 | +# |
| 2 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 3 | +# or more contributor license agreements. See the NOTICE file |
| 4 | +# distributed with this work for additional information |
| 5 | +# regarding copyright ownership. The ASF licenses this file |
| 6 | +# to you under the Apache License, Version 2.0 (the |
| 7 | +# "License"); you may not use this file except in compliance |
| 8 | +# with the License. You may obtain a copy of the License at |
| 9 | +# |
| 10 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +# |
| 12 | +# Unless required by applicable law or agreed to in writing, |
| 13 | +# software distributed under the License is distributed on an |
| 14 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | +# KIND, either express or implied. See the License for the |
| 16 | +# specific language governing permissions and limitations |
| 17 | +# under the License. |
| 18 | +# |
| 19 | + |
| 20 | +name: Nightly Build |
| 21 | + |
| 22 | +on: |
| 23 | + schedule: |
| 24 | + - cron: '15 12 * * *' |
| 25 | + workflow_dispatch: |
| 26 | + |
| 27 | +# Setting explicit permissions for the action to avoid the default permissions which are `write-all` in case of pull_request_target event |
| 28 | +permissions: |
| 29 | + actions: read |
| 30 | + pull-requests: read |
| 31 | + checks: read |
| 32 | + contents: read |
| 33 | + deployments: read |
| 34 | + id-token: none |
| 35 | + issues: read |
| 36 | + discussions: read |
| 37 | + packages: read |
| 38 | + pages: read |
| 39 | + repository-projects: read |
| 40 | + security-events: read |
| 41 | + statuses: read |
| 42 | + |
| 43 | +jobs: |
| 44 | + nightly_build: |
| 45 | + runs-on: ubuntu-latest |
| 46 | + steps: |
| 47 | + - name: Checkout |
| 48 | + uses: actions/checkout@v4 |
| 49 | + - name: Set up JDK 21 |
| 50 | + uses: actions/setup-java@v4 |
| 51 | + with: |
| 52 | + java-version: '21' |
| 53 | + distribution: 'temurin' |
| 54 | + - name: Setup Gradle |
| 55 | + uses: gradle/actions/setup-gradle@v4 |
| 56 | + with: |
| 57 | + validate-wrappers: false |
| 58 | + - name: Publish SNAPSHOTs to Apache Nexus Repository |
| 59 | + run: ./gradlew publishToApache |
| 60 | + env: |
| 61 | + ORG_GRADLE_PROJECT_apacheUsername: ${{ secrets.NEXUS_USER }} |
| 62 | + ORG_GRADLE_PROJECT_apachePassword: ${{ secrets.NEXUS_PW }} |
0 commit comments