diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1792d93..9b9facd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,11 +14,11 @@ jobs: distribution: 'zulu' java-version: 17 - name: Build with Gradle - run: gradle build + run: ./gradlew build - name: Set version run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - name: Publish to GitHub Packages & Maven Central - run: gradle publish publishToMavenCentralPortal + run: ./gradlew publish publishToMavenCentralPortal env: ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }} ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSPHRASE }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b96013d..c28cdc9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,7 @@ jobs: with: distribution: 'zulu' java-version: ${{ matrix.java }} - - run: gradle test + - run: ./gradlew test # Single stable check for branch protection, so the ruleset does not need # to change when the matrix does. diff --git a/README.md b/README.md index fbe5b89..27da029 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,31 @@ Validate Swedish organization numbers. Follows version 1.1 of the [specification](https://github.com/organisationsnummer/meta#package-specification-v11). +## Installation + +The package is published on [Maven Central](https://central.sonatype.com/artifact/dev.organisationsnummer/organisationsnummer). + +Maven: + +```xml + + dev.organisationsnummer + organisationsnummer + 1.2.1 + +``` + +Gradle: + +```groovy +dependencies { + implementation "dev.organisationsnummer:organisationsnummer:1.2.1" +} +``` + ## Example -```php +```java import dev.organisationsnummer.*; Organisationsnummer.valid("202100-5489"); diff --git a/gradlew b/gradlew old mode 100644 new mode 100755