From 587953705c2e9d8a6f4aed0af3e7acd42b0f7b35 Mon Sep 17 00:00:00 2001 From: Shahroz Khan Date: Mon, 18 Sep 2023 18:22:19 +0500 Subject: [PATCH] ci: provide version to deployment script --- .github/workflows/manual-deployment.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/manual-deployment.yml b/.github/workflows/manual-deployment.yml index d2f9c8895..71f591b33 100644 --- a/.github/workflows/manual-deployment.yml +++ b/.github/workflows/manual-deployment.yml @@ -17,7 +17,11 @@ jobs: - name: Get latest tag id: get-latest-tag - run: echo "::set-output name=tag::$(git describe --tags --abbrev=0)" + run: | + echo '::group::Get latest tag' + TAG=$(git describe --tags --abbrev=0) + echo "TAG=$TAG" >> $GITHUB_ENV + echo '::endgroup::' - name: Set up JDK uses: actions/setup-java@v3 @@ -26,7 +30,7 @@ jobs: java-version: 11 - name: Push to Sonatype servers - run: ./scripts/deploy-code.sh + run: MODULE_VERSION=${{ env.TAG }} ./scripts/deploy-code.sh env: OSSRH_USERNAME: ${{ secrets.GRADLE_PUBLISH_USERNAME }} OSSRH_PASSWORD: ${{ secrets.GRADLE_PUBLISH_PASSWORD }} @@ -60,7 +64,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": "*Version:* ${{ steps.get-latest-tag.outputs.tag }}\n\nAndroid SDK deployment progress:\n~1. Git tag already created~\n~2. Manual deploy to maven central~\n\n" + "text": "*Version:* ${{ env.TAG }}\n\nAndroid SDK deployment progress:\n~1. Git tag already created~\n~2. Manual deploy to maven central~\n\n" } } ] @@ -100,6 +104,4 @@ jobs: } env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFY_RELEASES_WEBHOOK_URL }} - SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK - - + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK \ No newline at end of file