Skip to content

Commit 2fed44a

Browse files
committed
Add Github actions for build
1 parent 3e48f98 commit 2fed44a

File tree

2 files changed

+58
-2
lines changed

2 files changed

+58
-2
lines changed

.github/workflows/main.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Build and Deploy Snapshot
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- "3.0"
7+
- "2.13"
8+
paths-ignore:
9+
- "README.md"
10+
- "release-notes/*"
11+
pull_request:
12+
branches:
13+
- master
14+
- "3.0"
15+
- "2.13"
16+
paths-ignore:
17+
- "README.md"
18+
- "release-notes/*"
19+
jobs:
20+
build:
21+
runs-on: ${{ matrix.os }}
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
java_version: ['8', '11']
26+
os: ['ubuntu-20.04']
27+
env:
28+
JAVA_OPTS: "-XX:+TieredCompilation -XX:TieredStopAtLevel=1"
29+
steps:
30+
- uses: actions/checkout@v2
31+
- name: Set up JDK
32+
uses: actions/setup-java@v2
33+
with:
34+
distribution: "adopt"
35+
java-version: ${{ matrix.java_version }}
36+
server-id: sonatype-nexus-snapshots
37+
server-username: CI_DEPLOY_USERNAME
38+
server-password: CI_DEPLOY_PASSWORD
39+
# See https://github.com/actions/setup-java/blob/v2/docs/advanced-usage.md#Publishing-using-Apache-Maven
40+
# gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
41+
# gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
42+
- uses: actions/[email protected]
43+
with:
44+
path: ~/.m2/repository
45+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
46+
restore-keys: |
47+
${{ runner.os }}-maven-
48+
- name: Build
49+
run: ./mvnw -V -B -ff -ntp verify
50+
- name: Deploy snapshot
51+
if: github.event_name != 'pull_request' && matrix.java_version == '8'
52+
env:
53+
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
54+
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }}
55+
# MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
56+
run: ./mvnw -V -B -ff -DskipTests -ntp source:jar deploy

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ For Jackson 2.x this is done by sub-classing Jackson core abstractions of:
1717

1818
# Status
1919

20-
[![Build Status](https://travis-ci.org/FasterXML/jackson-dataformats-binary.svg)](https://travis-ci.org/FasterXML/jackson-dataformats-binary)
20+
[![Build (github)](https://github.com/FasterXML/jackson-dataformats-binary/actions/workflows/main.yml/badge.svg)](https://github.com/FasterXML/jackson-dataformats-binary/actions/workflows/main.yml)
21+
[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/jackson-dataformats-binary.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:jackson-dataformats-binary)
2122

2223
# Binary formats supported
2324

@@ -68,7 +69,6 @@ are active maintenance branches in which much of development happens:
6869
* `2.13` is for developing the next 2.x version
6970
* `2.12` and `2.11` are for backported fixes for 2.12/2.11 versions (respectively)
7071

71-
7272
Older branches are usually not changed but are available for historic reasons.
7373
All released versions have matching git tags (`jackson-dataformats-binary-2.10.3`).
7474

0 commit comments

Comments
 (0)