Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] Prep v0.5.3 release, auto-release process #31

Merged
merged 2 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 28 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,17 @@ on:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
matrix:
java_version: [ "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19" ]
java_version: [ "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23" ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK for compilation
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "23" # Always use the latest JDK for building
- name: Load Maven dependencies cache
uses: actions/cache@v3
with:
Expand All @@ -23,11 +28,6 @@ jobs:
${{ runner.os }}-maven-
- name: Install dependencies
run: make install
- name: Set up JDK for compilation
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "19" # Always use the latest JDK for building
- name: Compile
run: make build
- name: Set up Java ${{ matrix.java_version }}
Expand All @@ -38,16 +38,16 @@ jobs:
- name: Run test with Java ${{ matrix.java_version }}
run: make test
coverage:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: make install
- uses: actions/checkout@v4
- name: Set up JDK for compilation
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "19" # Always use the latest JDK for building
java-version: "23" # Always use the latest JDK for building
- name: Install dependencies
run: make install
- name: Test coverage
run: make coverage
- name: Load Rust cache
Expand All @@ -66,9 +66,14 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: "./coverage.lcov"
lint:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK for compilation
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "23" # Always use the latest JDK for building
- name: Run CheckStyle checks
uses: nikitasavinov/checkstyle-action@0.5.1
with:
Expand All @@ -77,9 +82,14 @@ jobs:
checkstyle_config: easypost_java_style.xml
tool_name: "style_enforcer"
security:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK for compilation
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "23" # Always use the latest JDK for building
- name: Load Maven dependencies and CVE database cache
uses: actions/cache@v3
with:
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# This workflow will build a Java project with Maven and publish it to Maven Central Repository
# ref: https://github.com/actions/setup-java/blob/v3.11.0/docs/advanced-usage.md#Publishing-using-Apache-Maven

# Secrets required:
# - MAVEN_USERNAME: Username for Maven Central Repository
# - MAVEN_CENTRAL_TOKEN: Token/password for Maven Central Repository
# - MAVEN_GPG_PRIVATE_KEY: GPG private key to sign the artifacts (string)
# - MAVEN_GPG_PASSPHRASE: Passphrase for the GPG private key

name: Publish library to Maven Central Repository

on:
release:
types: [created]
secrets:
MAVEN_USERNAME:
required: true
MAVEN_CENTRAL_TOKEN:
required: true
MAVEN_GPG_PRIVATE_KEY:
required: true
MAVEN_GPG_PASSPHRASE:
required: true
workflow_dispatch: ~

jobs:
release:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install JDK
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "23" # Always use the latest JDK
server-id: "ossrh"
# define environmental variable names
server-username: MAVEN_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
gpg-passphrase: MAVEN_GPG_PASSPHRASE
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}

- name: Clean, build and publish to Apache Maven Central
run: make install-styleguide publish pass=${{ secrets.MAVEN_GPG_PASSPHRASE }}
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

- name: Upload output files to release
uses: AButler/upload-release-assets@v3.0
with:
files: "target/*.jar;target/*.pom;target/*.asc"
repo-token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CHANGELOG

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

- New `byCustomRule` function to allow users to define their own matching rule when finding a matching interaction in a cassette
- Improve error messages when a matching interaction is not found (human-readable error messages)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Add this to your project's POM:
<dependency>
<groupId>com.easypost</groupId>
<artifactId>easyvcr</artifactId>
<version>0.5.2</version>
<version>0.5.3</version>
</dependency>
```

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

```groovy
implementation "com.easypost:easyvcr:0.5.2"
implementation "com.easypost:easyvcr:0.5.3"
```

## Supported HTTP Clients
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.2
0.5.3
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<groupId>com.easypost</groupId>
<artifactId>easyvcr</artifactId>

<version>0.5.2</version>
<version>0.5.3</version>
<packaging>jar</packaging>

<name>com.easypost:easyvcr</name>
Expand Down
Loading