+++ /dev/null
-# These are supported funding model platforms
-
-github: [miurahr] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
-patreon: # Replace with a single Patreon username
-open_collective: # Replace with a single Open Collective username
-ko_fi: # Replace with a single Ko-fi username
-tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
-community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
-liberapay: miurahr
-issuehunt: # Replace with a single IssueHunt username
-otechie: # Replace with a single Otechie username
-custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
+++ /dev/null
-name: Upload Release Asset
-
-on:
- push:
- tags:
- - 'v*'
-
-jobs:
- build:
- name: Upload Release Asset
- runs-on: ubuntu-latest
- steps:
- - name: Checkout code
- uses: actions/checkout@v3
- - uses: actions/setup-java@v3
- with:
- distribution: 'temurin'
- java-version: '8'
- - name: Get the version
- id: get_version
- run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
- - uses: gradle/gradle-build-action@v2
- - run: ./gradlew check build assemble
- - name: Create Release
- id: create_release
- uses: actions/create-release@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- tag_name: ${{ github.ref }}
- release_name: Release v${{ steps.get_version.outputs.VERSION }}
- draft: false
- prerelease: false
- - name: Publish package to OSSRH
- run: ./gradlew publishToSonatype
- env:
- ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_SECRET_KEY }}
- ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_KEY_PASSPHARASE }}
- SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
- SONATYPE_PASS: ${{ secrets.SONATYPE_PASS }}
- - name: Upload Release Asset(cli.zip)
- id: upload-release-asset-zip
- uses: actions/upload-release-asset@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ steps.create_release.outputs.upload_url }}
- asset_path: dictzip-cli/build/distributions/dictzip-${{ steps.get_version.outputs.VERSION }}.zip
- asset_name: dictzip-${{ steps.get_version.outputs.VERSION }}.zip
- asset_content_type: application/zip
- - name: Upload Release Asset(cli.tgz)
- id: upload-release-asset-tgz
- uses: actions/upload-release-asset@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- 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/x-gtar
- - name: Upload Release Asset(lib.jar)
- id: upload-release-asset-lib
- uses: actions/upload-release-asset@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ steps.create_release.outputs.upload_url }}
- asset_path: dictzip-lib/build/libs/dictzip-lib-${{ steps.get_version.outputs.VERSION }}.jar
- asset_name: dictzip-lib-${{ steps.get_version.outputs.VERSION }}.jar
- asset_content_type: application/java-archive
- - name: Upload Release Asset(lib.sources.jar)
- id: upload-release-asset-sources
- uses: actions/upload-release-asset@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ steps.create_release.outputs.upload_url }}
- asset_path: dictzip-lib/build/libs/dictzip-lib-${{ steps.get_version.outputs.VERSION }}-sources.jar
- asset_name: dictzip-lib-${{ steps.get_version.outputs.VERSION }}-sources.jar
- asset_content_type: application/java-archive
- - name: Upload Release Asset(lib.javadoc.jar)
- id: upload-release-asset-javadoc
- uses: actions/upload-release-asset@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ steps.create_release.outputs.upload_url }}
- asset_path: dictzip-lib/build/libs/dictzip-lib-${{ steps.get_version.outputs.VERSION }}-javadoc.jar
- asset_name: dictzip-lib-${{ steps.get_version.outputs.VERSION }}-javadoc.jar
- asset_content_type: application/java-archive
--- /dev/null
+trigger:
+- main
+
+jobs:
+ job: gradle
+ pool:
+ image: ubuntu-latest
+ steps:
+ - displayName: install dictzip command
+ bash: sudo apt-get install -y dictzip
+ - task: Gradle@2
+ inputs:
+ javaHomeOption: 'JDKVersion'
+ jdkVersionOption: '1.8'
+ tasks: 'check'
+## when library project to publish to OSSRH
+# - task: Gradle@2
+# displayName: Publish package to OSSRH
+# inputs:
+# javaHomeOption: 'JDKVersion'
+# jdkVersionOption: '1.8'
+# tasks: 'publishToSonatype'
+# env:
+# ORG_GRADLE_PROJECT_signingKey: $( secrets_GPG_SECRET_KEY )
+# ORG_GRADLE_PROJECT_signingPassword: $( secrets_GPG_KEY_PASSPHARASE )
+# SONATYPE_USER: $( secrets_SONATYPE_USER )
+# SONATYPE_PASS: $( secrets_SONATYPE_PASS )