Skip to content

Commit 8ee6612

Browse files
authored
[chore] Prep v0.5.3 release, auto-release process (#31)
- Add Actions-based release process - Bump version number
1 parent 8efec20 commit 8ee6612

File tree

6 files changed

+91
-23
lines changed

6 files changed

+91
-23
lines changed

.github/workflows/ci.yml

+28-18
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,17 @@ on:
88

99
jobs:
1010
build:
11-
runs-on: ubuntu-20.04
11+
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
java_version: [ "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19" ]
14+
java_version: [ "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23" ]
1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
17+
- name: Set up JDK for compilation
18+
uses: actions/setup-java@v4
19+
with:
20+
distribution: "zulu"
21+
java-version: "23" # Always use the latest JDK for building
1722
- name: Load Maven dependencies cache
1823
uses: actions/cache@v3
1924
with:
@@ -23,11 +28,6 @@ jobs:
2328
${{ runner.os }}-maven-
2429
- name: Install dependencies
2530
run: make install
26-
- name: Set up JDK for compilation
27-
uses: actions/setup-java@v3
28-
with:
29-
distribution: "zulu"
30-
java-version: "19" # Always use the latest JDK for building
3131
- name: Compile
3232
run: make build
3333
- name: Set up Java ${{ matrix.java_version }}
@@ -38,16 +38,16 @@ jobs:
3838
- name: Run test with Java ${{ matrix.java_version }}
3939
run: make test
4040
coverage:
41-
runs-on: ubuntu-20.04
41+
runs-on: ubuntu-latest
4242
steps:
43-
- uses: actions/checkout@v3
44-
- name: Install dependencies
45-
run: make install
43+
- uses: actions/checkout@v4
4644
- name: Set up JDK for compilation
47-
uses: actions/setup-java@v3
45+
uses: actions/setup-java@v4
4846
with:
4947
distribution: "zulu"
50-
java-version: "19" # Always use the latest JDK for building
48+
java-version: "23" # Always use the latest JDK for building
49+
- name: Install dependencies
50+
run: make install
5151
- name: Test coverage
5252
run: make coverage
5353
- name: Load Rust cache
@@ -66,9 +66,14 @@ jobs:
6666
github-token: ${{ secrets.GITHUB_TOKEN }}
6767
path-to-lcov: "./coverage.lcov"
6868
lint:
69-
runs-on: ubuntu-20.04
69+
runs-on: ubuntu-latest
7070
steps:
71-
- uses: actions/checkout@v3
71+
- uses: actions/checkout@v4
72+
- name: Set up JDK for compilation
73+
uses: actions/setup-java@v4
74+
with:
75+
distribution: "zulu"
76+
java-version: "23" # Always use the latest JDK for building
7277
- name: Run CheckStyle checks
7378
uses: nikitasavinov/[email protected]
7479
with:
@@ -77,9 +82,14 @@ jobs:
7782
checkstyle_config: easypost_java_style.xml
7883
tool_name: "style_enforcer"
7984
security:
80-
runs-on: ubuntu-20.04
85+
runs-on: ubuntu-latest
8186
steps:
82-
- uses: actions/checkout@v3
87+
- uses: actions/checkout@v4
88+
- name: Set up JDK for compilation
89+
uses: actions/setup-java@v4
90+
with:
91+
distribution: "zulu"
92+
java-version: "23" # Always use the latest JDK for building
8393
- name: Load Maven dependencies and CVE database cache
8494
uses: actions/cache@v3
8595
with:

.github/workflows/publish.yml

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# This workflow will build a Java project with Maven and publish it to Maven Central Repository
2+
# ref: https://github.com/actions/setup-java/blob/v3.11.0/docs/advanced-usage.md#Publishing-using-Apache-Maven
3+
4+
# Secrets required:
5+
# - MAVEN_USERNAME: Username for Maven Central Repository
6+
# - MAVEN_CENTRAL_TOKEN: Token/password for Maven Central Repository
7+
# - MAVEN_GPG_PRIVATE_KEY: GPG private key to sign the artifacts (string)
8+
# - MAVEN_GPG_PASSPHRASE: Passphrase for the GPG private key
9+
10+
name: Publish library to Maven Central Repository
11+
12+
on:
13+
release:
14+
types: [created]
15+
secrets:
16+
MAVEN_USERNAME:
17+
required: true
18+
MAVEN_CENTRAL_TOKEN:
19+
required: true
20+
MAVEN_GPG_PRIVATE_KEY:
21+
required: true
22+
MAVEN_GPG_PASSPHRASE:
23+
required: true
24+
workflow_dispatch: ~
25+
26+
jobs:
27+
release:
28+
runs-on: ubuntu-20.04
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v4
32+
with:
33+
fetch-depth: 0
34+
35+
- name: Install JDK
36+
uses: actions/setup-java@v3
37+
with:
38+
distribution: "zulu"
39+
java-version: "23" # Always use the latest JDK
40+
server-id: "ossrh"
41+
# define environmental variable names
42+
server-username: MAVEN_USERNAME
43+
server-password: MAVEN_CENTRAL_TOKEN
44+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
45+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
46+
47+
- name: Clean, build and publish to Apache Maven Central
48+
run: make install-styleguide publish pass=${{ secrets.MAVEN_GPG_PASSPHRASE }}
49+
env:
50+
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
51+
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
52+
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
53+
54+
- name: Upload output files to release
55+
uses: AButler/[email protected]
56+
with:
57+
files: "target/*.jar;target/*.pom;target/*.asc"
58+
repo-token: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CHANGELOG
22

3-
## Next Release
3+
## v0.5.3 (2024-09-24)
44

55
- New `byCustomRule` function to allow users to define their own matching rule when finding a matching interaction in a cassette
66
- Improve error messages when a matching interaction is not found (human-readable error messages)

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Add this to your project's POM:
1818
<dependency>
1919
<groupId>com.easypost</groupId>
2020
<artifactId>easyvcr</artifactId>
21-
<version>0.5.2</version>
21+
<version>0.5.3</version>
2222
</dependency>
2323
```
2424

@@ -27,7 +27,7 @@ Add this to your project's POM:
2727
Add this to your project's build file:
2828

2929
```groovy
30-
implementation "com.easypost:easyvcr:0.5.2"
30+
implementation "com.easypost:easyvcr:0.5.3"
3131
```
3232

3333
## Supported HTTP Clients

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.5.2
1+
0.5.3

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<groupId>com.easypost</groupId>
77
<artifactId>easyvcr</artifactId>
88

9-
<version>0.5.2</version>
9+
<version>0.5.3</version>
1010
<packaging>jar</packaging>
1111

1212
<name>com.easypost:easyvcr</name>

0 commit comments

Comments
 (0)