Skip to content

Commit 0b6dd02

Browse files
committed
Migrate to Github Actions, CodeCov and Maven Central and update maven wrapper and deps
1 parent 0ae5a13 commit 0b6dd02

10 files changed

+163
-263
lines changed

.github/workflows/build_deploy.yml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Build and Deploy with Maven
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- '*' # Trigger on all tags
9+
pull_request: { }
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout Code
17+
uses: actions/checkout@v3
18+
- name: Set up JDK 8
19+
uses: actions/setup-java@v3
20+
with:
21+
java-version: '8'
22+
distribution: 'adopt'
23+
cache: 'maven'
24+
- name: Build with Maven
25+
run: ./mvnw -B clean package checkstyle:checkstyle jacoco:report -DcommonConfig.jarSign.skip=true
26+
- name: Upload coverage reports to CodeCov
27+
uses: codecov/codecov-action@v3
28+
29+
deploy:
30+
needs: build
31+
if: startsWith(github.ref, 'refs/tags/')
32+
runs-on: ubuntu-latest
33+
34+
steps:
35+
- uses: actions/checkout@v3
36+
- name: Retrieve Keystore from secrets
37+
env:
38+
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}
39+
run: |
40+
echo $KEYSTORE_BASE64 | base64 --decode > keystore.jks
41+
- name: Set up Maven Central Repository
42+
uses: actions/setup-java@v3
43+
with:
44+
java-version: '8'
45+
distribution: 'adopt'
46+
cache: 'maven'
47+
server-id: ossrh
48+
server-username: MAVEN_USERNAME
49+
server-password: MAVEN_PASSWORD
50+
- name: Publish package
51+
run: mvn -B deploy -DskipTests
52+
env:
53+
OPENSOURCE_PROJECTS_KS_PW: ${{ secrets.KEYSTORE_PASSWORD }}
54+
OPENSOURCE_PROJECTS_KEY_PW: ${{ secrets.KEYSTORE_KEY_PASSWORD }}
55+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
56+
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
57+
- name: Create and upload Github Release
58+
uses: xresloader/upload-to-github-release@v1
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61+
with:
62+
file: "target/*.jar;target/*.sha256;target/checksum-sha256.txt"
63+
tags: true
64+
draft: false

.mvn/wrapper/MavenWrapperDownloader.java

-117
This file was deleted.

.mvn/wrapper/maven-wrapper.jar

9 KB
Binary file not shown.

.mvn/wrapper/maven-wrapper.properties

+18-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,18 @@
1-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
2-
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
1+
# 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+
# https://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+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.7/apache-maven-3.8.7-bin.zip
18+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar

.travis.yml

-51
This file was deleted.

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ to blindly paste code snippets from
2727
[o](https://stackoverflow.com/a/9670279/774398)
2828
[m](https://stackoverflow.com/questions/1519736/random-shuffling-of-an-array)
2929

30-
[![Download](https://api.bintray.com/packages/patrickfav/maven/bytes-java/images/download.svg)](https://bintray.com/patrickfav/maven/bytes-java/_latestVersion)
30+
[![Maven Central](https://img.shields.io/maven-central/v/at.favre.lib/bytes)](https://mvnrepository.com/artifact/at.favre.lib/bytes)
3131
[![Build Status](https://travis-ci.com/patrickfav/bytes-java.svg?branch=master)](https://travis-ci.com/patrickfav/bytes-java)
3232
[![Javadocs](https://www.javadoc.io/badge/at.favre.lib/bytes.svg)](https://www.javadoc.io/doc/at.favre.lib/bytes)
33-
[![Coverage Status](https://coveralls.io/repos/github/patrickfav/bytes-java/badge.svg?branch=master)](https://coveralls.io/github/patrickfav/bytes-java?branch=master)
33+
[![codecov](https://codecov.io/gh/patrickfav/bytes-java/branch/master/graph/badge.svg?token=YiSRwBApvz)](https://codecov.io/gh/patrickfav/bytes-java)
3434
[![Maintainability](https://api.codeclimate.com/v1/badges/43b7770f0ee00b85f92a/maintainability)](https://codeclimate.com/github/patrickfav/bytes-java/maintainability)
3535

3636
It's main features include:

0 commit comments

Comments
 (0)