You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# ~ Licensed to the Apache Software Foundation (ASF) under one
2
+
# ~ or more contributor license agreements. See the NOTICE file
3
+
# ~ distributed with this work for additional information
4
+
# ~ regarding copyright ownership. The ASF licenses this file
5
+
# ~ to you under the Apache License, Version 2.0 (the
6
+
# ~ "License"); you may not use this file except in compliance
7
+
# ~ with the License. You may obtain a copy of the License at
8
+
# ~
9
+
# ~ http://www.apache.org/licenses/LICENSE-2.0
10
+
# ~
11
+
# ~ Unless required by applicable law or agreed to in writing,
12
+
# ~ software distributed under the License is distributed on an
13
+
# ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+
# ~ KIND, either express or implied. See the License for the
15
+
# ~ specific language governing permissions and limitations
16
+
# ~ under the License.
17
+
18
+
name: Build
19
+
on:
20
+
push:
21
+
branches:
22
+
- trunk
23
+
pull_request:
24
+
types: [opened, synchronize, reopened]
25
+
jobs:
26
+
build:
27
+
name: Maven Build
28
+
runs-on: ubuntu-latest
29
+
steps:
30
+
- name: Git clone
31
+
uses: actions/checkout@v4
32
+
- name: Set up JDK 11
33
+
uses: actions/setup-java@v4
34
+
with:
35
+
java-version: 11
36
+
distribution: temurin
37
+
cache: maven
38
+
server-id: apache.snapshots.https # Value of the distributionManagement/repository/id field of the pom.xml
39
+
server-username: MAVEN_APACHE_NEXUS_USERNAME # env variable for username in deploy
40
+
server-password: MAVEN_APACHE_NEXUS_PASSWORD # env variable for token in deploy
41
+
# sets environment variables to be used in subsequent steps: https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
42
+
- name: Set environment variables
43
+
shell: bash
44
+
run: |
45
+
if [ "${{github.ref}}" = "refs/heads/trunk" ] && [ "${{github.event_name}}" = "push" ] && [ "${{github.repository_owner}}" = "apache" ]; then
46
+
echo 'Running on main branch of the canonical repo'
0 commit comments