Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
charphi committed Mar 13, 2024
2 parents dcda75f + 70f7c08 commit 2d4dd2d
Show file tree
Hide file tree
Showing 19 changed files with 639 additions and 222 deletions.
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ updates:
target-branch: "develop"
directory: "/"
schedule:
interval: daily
time: "04:00"
interval: "weekly"
day: "saturday"
open-pull-requests-limit: 10
- package-ecosystem: "github-actions"
target-branch: "develop"
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Check links in documentation

on:
push:
paths:
- '.github/workflows/check-links.yml'
- 'lychee.toml'
- '**/*.md'
schedule:
# Run on the first of each month at 9:00 AM
- cron: "0 9 1 * *"
workflow_dispatch:

concurrency:
group: "${{ github.workflow }}-${{ github.head_ref }}"
cancel-in-progress: true

jobs:
lychee:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Restore lychee cache
uses: actions/cache@v4
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-

- name: Check links
id: lychee
uses: lycheeverse/[email protected]
with:
fail: true
args: --max-concurrency 1 --cache --no-progress --exclude-all-private './**/*.md'
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -50,7 +50,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -64,4 +64,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
8 changes: 4 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

steps:
- name: Checkout source code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
Expand Down Expand Up @@ -44,19 +44,19 @@ jobs:

steps:
- name: Checkout pages
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: 'gh-pages'

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: /root/.jbang
key: $-jbang-$
restore-keys: |
$-jbang-
- name: Create index.html
uses: jbangdev/jbang-action@v0.104.0
uses: jbangdev/jbang-action@main
with:
trust: https://gist.github.com/charphi/
script: https://gist.github.com/charphi/f44a24eb35dbd61b9f1d7759f0e561bd
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/java-ea-maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,27 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [ '-ea' ]
java: [ 21 ]
os: [ ubuntu-latest ]

name: JDK${{ matrix.java }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

steps:
- name: Checkout source code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: 'maven'

- name: Build and (headless) test with Maven
uses: GabrielBB/xvfb-action@v1
uses: smithki/xvfb-action@v1.1.2
with:
run: mvn -U -B -ntp package
run: mvn -U -B -ntp verify
70 changes: 54 additions & 16 deletions .github/workflows/java8-maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,103 +4,132 @@ on: [ push, pull_request ]

jobs:
build-and-test-job:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
if: github.event_name == 'pull_request' || startsWith(github.ref, 'refs/heads/develop') || startsWith(github.ref, 'refs/tags/v')
strategy:
fail-fast: false
matrix:
java: [ 8, 17 ]
java: [ 8, 21 ]
os: [ ubuntu-latest, macOS-latest, windows-latest ]

name: JDK${{ matrix.java }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

steps:
- name: Checkout source code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: 'maven'

- name: Pre-download dependencies with Maven
run: mvn -U -B -ntp dependency:go-offline

- name: Build and (headless) test with Maven
uses: GabrielBB/xvfb-action@v1
uses: smithki/xvfb-action@v1.1.2
with:
run: mvn -U -B -ntp package
run: mvn -U -B -ntp verify

auto-merge-job:
needs: build-and-test-job
if: startsWith(github.repository, 'nbbrd/') && github.event_name == 'pull_request' && github.actor == 'dependabot[bot]'
permissions:
contents: write
pull-requests: write

name: Auto-merge on dependabot PR
runs-on: ubuntu-latest

steps:
- name: Merge PR
run: gh pr merge --auto --rebase "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

snapshot-job:
needs: build-and-test-job
if: startsWith(github.repository, 'nbbrd/') && startsWith(github.ref, 'refs/heads/develop')
strategy:
matrix:
java: [ 17 ]
java: [ 21 ]
os: [ ubuntu-latest ]

name: Snapshot on develop
runs-on: ${{ matrix.os }}

steps:
- name: Checkout source code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: 'maven'

- name: Deploy snapshot with Maven if settings defined
run: test ! -f ci.settings.xml || mvn -B -ntp deploy -DskipTests=true -s ci.settings.xml -P base-deploy,snapshot-deploy,!non-deployable-modules
run: test ! -f ci.settings.xml || mvn -B -ntp deploy -DskipTests -s ci.settings.xml -P base-deploy,snapshot-deploy,!non-deployable-modules
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
SIGN_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
SIGN_KEY_PASS: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

- name: Dryrun release assets with Maven
run: mvn -B -ntp install -DskipTests=true -P full-release -Djreleaser.dry.run=true
run: mvn -B -ntp install -DskipTests -P full-release -Djreleaser.output.directory=$PWD/out/jreleaser -Djreleaser.dry.run
env:
JRELEASER_GITHUB_TOKEN: ${{ secrets.JRELEASER_GITHUB_TOKEN }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.MAVEN_GPG_PUBLIC_KEY }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

- name: Upload JReleaser output
if: always()
uses: actions/upload-artifact@v4
with:
name: assets-snapshot-log
path: |
out/jreleaser/trace.log
out/jreleaser/output.properties
release-job:
needs: build-and-test-job
if: startsWith(github.repository, 'nbbrd/') && startsWith(github.ref, 'refs/tags/v')
strategy:
matrix:
java: [ 17 ]
java: [ 21 ]
os: [ ubuntu-latest ]

name: Release on tag
runs-on: ${{ matrix.os }}

steps:
- name: Checkout source code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: 'maven'

- name: Deploy with Maven if settings defined
run: test ! -f ci.settings.xml || mvn -B -ntp deploy -DskipTests=true -s ci.settings.xml -P base-deploy,release-deploy,!non-deployable-modules
run: test ! -f ci.settings.xml || mvn -B -ntp deploy -DskipTests -s ci.settings.xml -P base-deploy,release-deploy,!non-deployable-modules
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
Expand All @@ -110,9 +139,18 @@ jobs:
MAVEN_OPTS: "--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED"

- name: Release assets with Maven
run: mvn -B -ntp install -DskipTests=true -P full-release
run: mvn -B -ntp install -DskipTests -P full-release -Djreleaser.output.directory=$PWD/out/jreleaser
env:
JRELEASER_GITHUB_TOKEN: ${{ secrets.JRELEASER_GITHUB_TOKEN }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.MAVEN_GPG_PUBLIC_KEY }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

- name: Upload JReleaser output
if: always()
uses: actions/upload-artifact@v4
with:
name: assets-release-log
path: |
out/jreleaser/trace.log
out/jreleaser/output.properties
16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.3.0] - 2024-03-12

This is a feature release of **picocsv**.
picocsv follows [semantic versioning](https://semver.org/).

### Added

- Add `Format#acceptMissingField` option to follow the RFC4180 spec closely [#208](https://github.com/nbbrd/picocsv/issues/208)

### Changed

- Java 8 minimum requirement

## [2.2.2] - 2023-04-14

This is a bugfix release of **picocsv**.
Expand Down Expand Up @@ -127,7 +140,8 @@ picocsv follows [semantic versioning](https://semver.org/).

- Initial release

[Unreleased]: https://github.com/nbbrd/picocsv/compare/v2.2.2...HEAD
[Unreleased]: https://github.com/nbbrd/picocsv/compare/v2.3.0...HEAD
[2.3.0]: https://github.com/nbbrd/picocsv/compare/v2.2.2...v2.3.0
[2.2.2]: https://github.com/nbbrd/picocsv/compare/v2.2.1...v2.2.2
[2.2.1]: https://github.com/nbbrd/picocsv/compare/v2.2.0...v2.2.1
[2.2.0]: https://github.com/nbbrd/picocsv/compare/v2.1.0...v2.2.0
Expand Down
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Key points:
as [an external dependency](https://search.maven.org/artifact/com.github.nbbrd.picocsv/picocsv)
or [as a single-file source](https://github.com/nbbrd/picocsv/blob/develop/src/main/java/nbbrd/picocsv/Csv.java)
- has a module-info that makes it compatible with [JPMS](https://www.baeldung.com/java-9-modularity)
- Java 7 minimum requirement
- Java 8 minimum requirement

Features:

Expand All @@ -25,6 +25,9 @@ Features:
- supports custom line separator
- supports comment character

⚠️ _Note that the `Format#acceptMissingField` option must be set to `false` to closely follow the RFC4180 specification.
The default value is currently `true` but will be reversed in the next major release._

## Examples

### Read examples
Expand Down Expand Up @@ -81,3 +84,24 @@ Maven setup:
<version>LATEST_VERSION</version>
</dependency>
```

## Developing

This project is written in Java and uses [Apache Maven](https://maven.apache.org/) as a build tool.
It requires [Java 8 as minimum version](https://whichjdk.com/) and all its dependencies are hosted on [Maven Central](https://search.maven.org/).

The code can be build using any IDE or by just type-in the following commands in a terminal:

```shell
git clone https://github.com/nbbrd/picocsv.git
cd picocsv
mvn clean install
```

## Contributing

Any contribution is welcome and should be done through pull requests and/or issues.

## Licensing

The code of this project is licensed under the [European Union Public Licence (EUPL)](https://joinup.ec.europa.eu/page/eupl-text-11-12).
Loading

0 comments on commit 2d4dd2d

Please sign in to comment.