Skip to content

Commit 2596227

Browse files
authored
Merge pull request #46 from patrickfav/feature/github-actions
2 parents 9dc8306 + f3fe79f commit 2596227

File tree

6 files changed

+92
-68
lines changed

6 files changed

+92
-68
lines changed

.github/workflows/build_deploy.yml

Lines changed: 64 additions & 0 deletions
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: "modules/bcrypt/target/bcrypt-*.jar;modules/bcrypt/target/*.sha256;modules/bcrypt/target/checksum-sha256.txt;modules/bcrypt-cli/target/bcrypt-*-full.jar;modules/bcrypt-cli/target/*.sha256"
63+
tags: true
64+
draft: false

.travis.yml

Lines changed: 0 additions & 54 deletions
This file was deleted.

CHANGELOG

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Releases
22

3+
## v0.10.0
4+
5+
* [BREAKING CHANGE] the null terminator will not be counted to the 72 byte max length anymore. This changes the behaviour IF you used passwords with EXACTLY 72 bytes. #43, #44 (thx @quinot)
6+
* migrate to Maven Central, Github Actions and Codecov #46
7+
* update many dependencies and remove warnings for CVE-2020-15522 (bc) CVE-2020-15250 (junit) -> were never part of production code #41
8+
9+
310
## v0.9.0
411
* fix license headers and correct credits to jBcrypt
512
* add long-password strategy to verifier #21

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
This is an implementation of the OpenBSD Blowfish password hashing algorithm, as described in "[A Future-Adaptable Password Scheme](http://www.openbsd.org/papers/bcrypt-paper.ps)" by Niels Provos and David Mazieres. It's core is based on [jBcrypt](https://github.com/djmdjm/jBCrypt), but heavily refactored, modernized and with a lot of updates and enhancements. It supports all common [versions](https://en.wikipedia.org/wiki/Bcrypt#Versioning_history), has a security sensitive API and is fully tested against a range of test vectors and reference implementations.
44

5-
[![Download](https://api.bintray.com/packages/patrickfav/maven/bcrypt/images/download.svg)](https://bintray.com/patrickfav/maven/bcrypt/_latestVersion)
6-
[![Build Status](https://travis-ci.com/patrickfav/bcrypt.svg?branch=master)](https://travis-ci.com/patrickfav/bcrypt)
5+
![Maven Central](https://img.shields.io/maven-central/v/at.favre.lib/bcrypt)
6+
[![Github Actions](https://github.com/patrickfav/bcrypt/actions/workflows/build_deploy.yml/badge.svg)](https://github.com/patrickfav/bcrypt/actions)
77
[![Javadocs](https://www.javadoc.io/badge/at.favre.lib/bcrypt.svg)](https://www.javadoc.io/doc/at.favre.lib/bcrypt)
8-
[![Coverage Status](https://coveralls.io/repos/github/patrickfav/bcrypt/badge.svg?branch=master)](https://coveralls.io/github/patrickfav/bcrypt?branch=master)
8+
[![codecov](https://codecov.io/gh/patrickfav/bcrypt/branch/master/graph/badge.svg?token=HP8FL3ZJG7)](https://codecov.io/gh/patrickfav/bcrypt)
99
[![Maintainability](https://api.codeclimate.com/v1/badges/bbc7ebd960a9f0bb7baa/maintainability)](https://codeclimate.com/github/patrickfav/bcrypt/maintainability)
1010

1111
The code is compiled with target [Java 7](https://en.wikipedia.org/wiki/Java_version_history#Java_SE_7) to be compatible with most [_Android_](https://www.android.com/) versions as well as normal Java applications.
@@ -180,7 +180,7 @@ The full API can be read in the doc by passing `-h`
180180

181181
## Download
182182

183-
The artifacts are deployed to [jcenter](https://bintray.com/bintray/jcenter) and [Maven Central](https://search.maven.org/).
183+
The artifacts are deployed to [Maven Central](https://search.maven.org/).
184184

185185
### Maven
186186

pom.xml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,26 @@
3535

3636
<repositories>
3737
<repository>
38-
<id>jcenter</id>
39-
<name>jcenter</name>
40-
<url>https://jcenter.bintray.com</url>
38+
<id>central</id>
39+
<name>Maven Central</name>
40+
<url>https://repo1.maven.org/maven2</url>
4141
<snapshots>
4242
<enabled>false</enabled>
4343
</snapshots>
4444
</repository>
4545
</repositories>
4646

47+
<pluginRepositories>
48+
<pluginRepository>
49+
<id>central</id>
50+
<name>Maven Central</name>
51+
<url>https://repo1.maven.org/maven2</url>
52+
<snapshots>
53+
<enabled>false</enabled>
54+
</snapshots>
55+
</pluginRepository>
56+
</pluginRepositories>
57+
4758
<build>
4859
<plugins>
4960
<plugin>
@@ -58,18 +69,14 @@
5869
<groupId>org.jacoco</groupId>
5970
<artifactId>jacoco-maven-plugin</artifactId>
6071
</plugin>
61-
<plugin>
62-
<groupId>org.eluder.coveralls</groupId>
63-
<artifactId>coveralls-maven-plugin</artifactId>
64-
</plugin>
6572
</plugins>
6673
</build>
6774

6875
<distributionManagement>
6976
<repository>
70-
<id>bintray-patrickfav</id>
71-
<name>patrickfav-bcrypt</name>
72-
<url>https://api.bintray.com/maven/patrickfav/maven/bcrypt/;publish=1</url>
77+
<id>ossrh</id>
78+
<name>Central Repository OSSRH</name>
79+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
7380
</repository>
7481
</distributionManagement>
7582

secrets.tar.enc

-6.52 KB
Binary file not shown.

0 commit comments

Comments
 (0)