diff --git a/.github/workflows/gradle-publish.yml b/.github/workflows/gradle-publish.yml index 1ce13e81..845430d6 100644 --- a/.github/workflows/gradle-publish.yml +++ b/.github/workflows/gradle-publish.yml @@ -1,4 +1,4 @@ -name: Publish to Github Packages +name: Publish Package on: workflow_dispatch: @@ -14,8 +14,10 @@ jobs: env: CI_GITHUB: 'x' CI_GITHUB_BRANCH: ${{ github.ref_name }} - CI_GITHUB_USERNAME: ${{ github.actor }} - CI_GITHUB_PASSWORD: ${{ secrets.GITHUB_TOKEN }} + ORG_GRADLE_PROJECT_GithubUsername: ${{ github.actor }} + ORG_GRADLE_PROJECT_GithubPassword: ${{ secrets.GITHUB_TOKEN }} + ORG_GRADLE_PROJECT_RepsyUsername: darvil + ORG_GRADLE_PROJECT_RepsyPassword: ${{ secrets.REPSY_PASSWORD }} runs-on: ubuntu-latest diff --git a/README.md b/README.md index 06084cf1..090818c4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@
- + Lanat logo

@@ -65,18 +65,35 @@ Deep documentation and tutorials comming soon. ## Installation -The package is currently only available on GitHub Packages. +The package is currently available on Repsy and GitHub Packages. -### Gradle +1. Add the following to your `repositories` block: + ```kotlin + maven("https://repsy.io/mvn/darvil/java") + ``` + +2. And add the following to your `dependencies` block: + ```kotlin + implementation("com.darvil:lanat:+") + ``` + > [!NOTE] + > The `+` symbol is a wildcard that will automatically use the latest version of the package. + > You can also specify a specific version (e.g. `0.1.0`). + +
+ +Install from Github Packages + +If using Gradle, follow these steps: 1. Authenticate to GitHub Packages to be able to download the package. You can do this by adding the following to your [gradle.properties](https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties) file: - ``` - gpr.user=USERNAME - gpr.key=PERSONAL_ACCESS_TOKEN - ``` + ``` + gpr.user=USERNAME + gpr.key=PERSONAL_ACCESS_TOKEN + ``` - Replace `USERNAME` with your GitHub username and `PERSONAL_ACCESS_TOKEN` with a personal access token that has the `read:packages` scope. + Replace `USERNAME` with your GitHub username and `PERSONAL_ACCESS_TOKEN` with a personal access token that has the `read:packages` scope. 2. Add the following inside your `repositories` block: @@ -90,16 +107,10 @@ The package is currently only available on GitHub Packages. } ``` -3. And add the following to your `dependencies` block: - - ```kotlin - implementation("darvil:lanat") - ``` - > [!NOTE] - > You may need to explicitly specify the version of the package you want to use. (e.g. `darvil:lanat:x.x.x`). +3. Follow step 2 from the previous section. This information is available at the [GitHub Packages documentation](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry#using-a-published-package). -### Other build tools +For other build tools, see [here](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry#using-a-published-package). -See [here](https://docs.github.com/en/packages/working-with-a-github-packages-registry). +
\ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index cc7ebef4..f46bc321 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,7 +3,7 @@ plugins { `maven-publish` } -group = "darvil" +group = "com.darvil" version = "0.1.0" description = "Command line argument parser" @@ -27,19 +27,21 @@ repositories { publishing { repositories { maven { - name = "github" + name = "Github" url = uri("https://maven.pkg.github.com/darvil82/Lanat") - credentials { - username = System.getenv("CI_GITHUB_USERNAME") - password = System.getenv("CI_GITHUB_PASSWORD") - } + credentials(PasswordCredentials::class) + } + + maven { + name = "Repsy" + url = uri("https://repsy.io/mvn/darvil/java") + credentials(PasswordCredentials::class) } } publications { - register("gpr") { + create("mavenJava") { from(components["java"]) - artifactId = rootProject.name } } }