From a94f3f864753bb9bdcde5421637d52d36917d22c Mon Sep 17 00:00:00 2001 From: conanoc Date: Thu, 22 Feb 2024 11:52:35 +0900 Subject: [PATCH] Update workflows (#20) Signed-off-by: conanoc --- .github/workflows/main.yml | 2 ++ .github/workflows/release.yml | 15 +++++---------- ariesframework/build.gradle | 3 ++- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b4e64ed..d73088b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,3 +24,5 @@ jobs: path: 'ariesframework/build/reports/ktlint/**/*.xml' - name: Build run: ./gradlew assembleDebug + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8915005..95f00bc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,6 +18,11 @@ jobs: uses: android-actions/setup-android@v2 - name: Build run: ./gradlew :ariesframework:assemble + - name: Publish + run: ./gradlew publishAllPublicationsToGithubRepository + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + VERSION: ${{ github.ref }} - name: Create Release id: create_release uses: softprops/action-gh-release@v1 @@ -26,13 +31,3 @@ jobs: with: draft: true prerelease: false - - name: Upload Release Asset - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./ariesframework/build/outputs/aar/ariesframework-release.aar - asset_name: aries-framework-kotlin.aar - asset_content_type: application/aar diff --git a/ariesframework/build.gradle b/ariesframework/build.gradle index 0f6140f..ac12616 100644 --- a/ariesframework/build.gradle +++ b/ariesframework/build.gradle @@ -79,6 +79,7 @@ if (secretPropsFile.exists()) { } else { ext["githubUsername"] = System.getenv("GITHUB_ACTOR") ext["githubToken"] = System.getenv("GITHUB_TOKEN") + ext["version"] = System.getenv("VERSION") } def getExtraString(name) { @@ -102,7 +103,7 @@ afterEvaluate { from components.release groupId 'org.hyperledger' artifactId 'aries-framework-kotlin' - version '2.0.0' + version getExtraString("version") } } }