From a39e20143dc439919012bdb2b0b19cde6a7c0e9b Mon Sep 17 00:00:00 2001 From: grablack Date: Wed, 6 Mar 2024 10:27:57 -0500 Subject: [PATCH] test semantic release integration --- .github/workflows/release-snapshots.yml | 39 ++++++++++++------------- .github/workflows/release.yml | 29 +++++++----------- build.gradle | 2 +- 3 files changed, 30 insertions(+), 40 deletions(-) diff --git a/.github/workflows/release-snapshots.yml b/.github/workflows/release-snapshots.yml index c69f6407..933f7195 100644 --- a/.github/workflows/release-snapshots.yml +++ b/.github/workflows/release-snapshots.yml @@ -44,25 +44,24 @@ jobs: signing_key_file: ${{ secrets.SIGNING_KEY_FILE }} signing_file_path: ${{ env.SIGNING_KEY_FILE_PATH }} - # - name: Install Semantic Release Dependencies - # run: npm install + - name: Install Semantic Release Dependencies + run: npm install - # TODO: update .releaserc.json with appropriate prepareCmd, successCmd, and assets - # TODO: enable semantic-release once fixed - # - name: GitHub Release - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # run: npx semantic-release@21 + - name: GitHub Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }} + SONATYPE_NEXUS_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} + SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} + SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} + SIGNING_KEY_FILE: ${{ env.SIGNING_KEY_FILE_PATH }} + run: npx semantic-release@21 - - name: Set Snapshot variable - id: set_var - run: echo "UPDATE_VERSION_SNAPSHOT=true" >> $GITHUB_ENV - - # - name: Publish to Maven - # uses: ./.github/actions/publish_all_modules - # with: - # sonatype_user: ${{ secrets.SONATYPE_SDKS_NEXUS_USERNAME }} - # sonatype_password: ${{ secrets.SONATYPE_SDKS_NEXUS_PASSWORD }} - # signing_key_id: ${{ secrets.SIGNING_KEY_ID }} - # signing_key_password: ${{ secrets.SIGNING_KEY_PASSWORD }} - # signing_key_file: ${{ env.SIGNING_KEY_FILE_PATH }} + - name: Publish to Maven + uses: ./.github/actions/publish_all_modules + with: + sonatype_user: ${{ secrets.SONATYPE_SDKS_NEXUS_USERNAME }} + sonatype_password: ${{ secrets.SONATYPE_SDKS_NEXUS_PASSWORD }} + signing_key_id: ${{ secrets.SIGNING_KEY_ID }} + signing_key_password: ${{ secrets.SIGNING_KEY_PASSWORD }} + signing_key_file: ${{ env.SIGNING_KEY_FILE_PATH }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0aa4b8ef..8bd53442 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,8 +44,8 @@ jobs: signing_key_file: ${{ secrets.SIGNING_KEY_FILE }} signing_file_path: ${{ env.SIGNING_KEY_FILE_PATH }} - # - name: Install Semantic Release Dependencies - # run: npm install + - name: Install Semantic Release Dependencies + run: npm install - name: GitHub Release env: @@ -57,20 +57,11 @@ jobs: SIGNING_KEY_FILE: ${{ env.SIGNING_KEY_FILE_PATH }} run: npx semantic-release@21 - - name: Get latest release - id: get_release - run: | - echo "::set-output name=release::${GITHUB_REF#refs/tags/}" - - - name: Echo Semantic Release Version - run: | - echo "Semantic Release Version: ${{ steps.get_release.outputs.release }}" - - # - name: Publish to Maven - # uses: ./.github/actions/publish_all_modules - # with: - # sonatype_user: ${{ secrets.SONATYPE_NEXUS_USERNAME }} - # sonatype_password: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} - # signing_key_id: ${{ secrets.SIGNING_KEY_ID }} - # signing_key_password: ${{ secrets.SIGNING_KEY_PASSWORD }} - # signing_key_file: ${{ env.SIGNING_KEY_FILE_PATH }} + - name: Publish to Maven + uses: ./.github/actions/publish_all_modules + with: + sonatype_user: ${{ secrets.SONATYPE_NEXUS_USERNAME }} + sonatype_password: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} + signing_key_id: ${{ secrets.SIGNING_KEY_ID }} + signing_key_password: ${{ secrets.SIGNING_KEY_PASSWORD }} + signing_key_file: ${{ env.SIGNING_KEY_FILE_PATH }} diff --git a/build.gradle b/build.gradle index 32c6acd9..bbe4011e 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ import org.jmailen.gradle.kotlinter.tasks.FormatTask buildscript { ext.modules = [ - "sdkVersionName" : "1.0.0-alpha.00", + "sdkVersionName" : "1.0.0-alpha.01-SNAPSHOT", "androidMinSdkVersion": 23, "androidTargetVersion": 34 ]