GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
arguments: publishMavenJavaPublicationToGitHubPackagesRepository
+ - uses: eskatos/gradle-command-action@v1
+ name: Releaase artifact to Azure packages
+ env:
+ AZURE_USER: ${{ secrets.AZURE_USER }}
+ AZURE_TOKEN: ${{ secrets.AZURE_TOKEN }}
+ with:
+ arguments: publishMavenJavaPublicationToAzurePackagesRepository
- name: Upload Release Asset(cli.zip)
id: upload-release-asset-zip
uses: actions/upload-release-asset@v1
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dictzip-cli/build/distributions/dictzip-${{ steps.get_version.outputs.VERSION }}.tgz
asset_name: dictzip-${{ steps.get_version.outputs.VERSION }}.tgz
- asset_content_type: application/gzip
+ asset_content_type: application/x-gtar
- name: Upload Release Asset(lib.jar)
id: upload-release-asset-lib
uses: actions/upload-release-asset@v1
+++ /dev/null
-deploy:
- image: gradle:6.8.3-jdk11
- script:
- - 'gradle publishMavenJavaPublicationToGitLabPackagesRepository'
- rules:
- - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_TAG'
## Usage
-Extract archive in directory. If you want to use just library, `dictzip-lib.jar`
+Extract archive in a directory. If you want to use just library, `dictzip-lib.jar`
is an only file for you.
CLI is also made for example of API usage and will be a good reference.
Also there is a javadoc of DictZip at https://miurahr.github.io/dictzip-java
-### from maven/gradle
+### gradle
-dictzip library is registered at JCenter repository. You can download
-from JCenter specifying as follows:
+dictzip library is published on GitHub Packages repository and Azure Artifactory repository.
```
-org.dict.zip:dictzip-lib:0.8.2
+repositories {
+ maven { // when use github
+ url "https://maven.pkg.github.com/dictzip/dictzip-java"
+ credentials {
+ username = 'github username'
+ password = 'personal access token'
+ }
+ }
+ maven { // when use Azure
+ url "https://pkgs.dev.azure.com/miurahr/github/_packaging/maven/maven/v1"
+ credentials {
+ username = 'azure devops username'
+ password = 'personal access token'
+ }
+ }
+}
+dependencies {
+ implementation 'org.dict.zip:dictzip-lib:0.9.1'
+}
```
## Build
}
// Drop prefix 'v' from latest tag version.
-version = {it -> it.substring(1, it.length())}(gitVersion())
-
-repositories {
- mavenCentral()
- maven {
- name = "GitLabPackages"
- url "https://gitlab.com/api/v4/groups/dictzip/-/packages/maven"
- credentials(HttpHeaderCredentials) {
- name = 'Job-Token'
- value = System.getenv("CI_JOB_TOKEN")
- }
- authentication {
- header(HttpHeaderAuthentication)
- }
- }
-}
+version = gitVersion().substring(1)
// common settings
subprojects {
version = rootProject.version
group = projectGroup
+ repositories {
+ mavenCentral()
+ }
+
dependencies {
testImplementation 'commons-io:commons-io:2.6'
testImplementation 'org.testng:testng:6.9.10'
url.set("https://github.com/dictzip/dictzip-java")
}
issueManagement {
- system.set("Trac")
url.set("https://github.com/dictzip/dictzip-java/issues")
}
}
}
}
maven {
- name = "GitLabPackages"
- url = "https://gitlab.com/api/v4/groups/dictzip/-/packages/maven"
- credentials(HttpHeaderCredentials) {
- name = 'Job-Token'
- value = System.getenv("CI_JOB_TOKEN")
+ name 'AzurePackages'
+ url 'https://pkgs.dev.azure.com/miurahr/github/_packaging/maven/maven/v1'
+ credentials(PasswordCredentials) {
+ username = System.getenv("AZURE_USER")
+ password = System.getenv("AZURE_TOKEN")
}
authentication {
- header(HttpHeaderAuthentication)
+ basic(BasicAuthentication)
}
}
}