forked from eclipse/transformer
83 lines (78 loc) · 2.54 KB
/
cibuild.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#*******************************************************************************
# Copyright (c) Contributors to the Eclipse Foundation
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
# which is available at https://www.apache.org/licenses/LICENSE-2.0.
#
# SPDX-License-Identifier: (EPL-2.0 OR Apache-2.0)
#*******************************************************************************
name: CI Build
on:
push:
branches-ignore:
- 'dependabot/**'
paths-ignore:
- 'docs/**'
- '.github/**/*docs*'
- '.github/*.yml'
pull_request:
paths-ignore:
- 'docs/**'
- '.github/**/*docs*'
- '.github/*.yml'
env:
LC_ALL: en_US.UTF-8
MAVEN_OPTS: >-
-Dhttp.keepAlive=false
-Dmaven.wagon.http.pool=false
-Dmaven.wagon.http.retryHandler.count=3
defaults:
run:
shell: bash
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-latest' ]
java: [ '11', '16' ]
include:
- os: 'ubuntu-latest'
java: '8'
canonical: ${{ (github.repository == 'eclipse/transformer') && ((github.ref == 'refs/heads/main') || (github.ref == 'refs/heads/release')) && (github.event_name != 'pull_request') }}
- os: 'ubuntu-latest'
java: '8'
experimental: true
mavenopts: '-Pbnd-snapshot'
- os: 'windows-latest'
java: '8'
name: JDK${{ matrix.java }} ${{ matrix.os }} ${{ matrix.mavenopts }}
runs-on: ${{ matrix.os }}
steps:
- name: Git Checkout
uses: actions/checkout@v2
- name: Set up Java ${{ matrix.java }}
uses: bjhargrave/setup-java@only-subkey-signing # actions/setup-java@v2
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
server-id: ossrh
server-username: OSSRH_USERNAME
server-password: OSSRH_TOKEN
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE
- name: Build
id: build
continue-on-error: ${{ matrix.experimental }}
run: |
./.github/scripts/build.sh ${{ matrix.mavenopts }}
- name: Publish
if: ${{ matrix.canonical && (steps.build.outcome == 'success') }}
run: |
./.github/scripts/publish.sh -Possrh
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}