From 851c3ce4afebd85d81271f6fc81aeb76fe5d64a8 Mon Sep 17 00:00:00 2001 From: uziasferreirazup Date: Mon, 20 Sep 2021 18:01:38 -0300 Subject: [PATCH] chore: adjust workflow Signed-off-by: uziasferreirazup --- .github/workflows/release.yml | 32 +++++++++++++++++++------------- fastlane/Fastfile | 9 ++++----- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a28ae05078..096b72b8fe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,24 +10,30 @@ jobs: runs-on: macos-latest steps: - uses: actions/checkout@v2.1.0 + - name: Read secrets from AWS Secrets Manager into environment variables + uses: abhilash1in/aws-secrets-manager-action@v1.0.1 with: - fetch-depth: '0' - ref: 'master' + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-east-1 + secrets: | + beagle/core/* + parse-json: true - name: Install Fastlane run: bundle install - name: Deploy new version env: - REPO_TOKEN: ${{ secrets.REPO_TOKEN }} - NAME_REPO_TOKEN: ${{ secrets.NAME_REPO_TOKEN }} - SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }} - SONATYPE_NEXUS_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} - GPG_KEY_CONTENTS: ${{ secrets.GPG_KEY_CONTENTS }} - ORG_GRADLE_PROJECT_SIGNINGKEYID: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEYID }} - ORG_GRADLE_PROJECT_SIGNINGPASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }} - GITHUB_USER: ${{ secrets.NAME_REPO_TOKEN }} - GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} - COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} + REPO_TOKEN: ${{ env.BEAGLE_CORE_GITHUB_GITHUB_TOKEN }} + NAME_REPO_TOKEN: ${{ env.BEAGLE_CORE_GITHUB_GITHUB_USER }} + ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ env.BEAGLE_CORE_ARTIFACT_SONATYPE_NEXUS_USERNAME }} + ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ env.BEAGLE_CORE_ARTIFACT_SONATYPE_NEXUS_PASSWORD }} + GPG_KEY_CONTENTS: ${{ env.BEAGLE_CORE_ARTIFACT_GPG_KEY_CONTENTS }} + ORG_GRADLE_PROJECT_SIGNINGKEYID: ${{ env.BEAGLE_CORE_ARTIFACT_ORG_GRADLE_PROJECT_SIGNINGKEYID }} + ORG_GRADLE_PROJECT_SIGNINGPASSWORD: ${{ env.BEAGLE_CORE_ARTIFACT_ORG_GRADLE_PROJECT_SIGNINGPASSWORD }} + GITHUB_USER: ${{ env.BEAGLE_CORE_GITHUB_GITHUB_USER }} + GITHUB_TOKEN: ${{ env.BEAGLE_CORE_GITHUB_GITHUB_TOKEN }} + COCOAPODS_TRUNK_TOKEN: ${{ env.BEAGLE_CORE_ARTIFACT_COCOAPODS_TRUNK_TOKEN }} TAG_NAME: ${{ github.REF }} REPO: ${{ github.repository }} COMMITISH: ${{ github.after }} - run: bundle exec fastlane deploy + run: bundle exec fastlane deploy \ No newline at end of file diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 692514ece3..fd963e3d80 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -19,8 +19,8 @@ platform :workflow do create_pull_request( api_token:ENV["REPO_TOKEN"], repo:ENV["REPO"], - title:"fix: Merge #{branchName} patch with master", - body: "Auto generated PR to merge fixes from #{branchName} into master." + title:"fix: Merge #{branchName} patch with main", + body: "Auto generated PR to merge fixes from #{branchName} into main." ) end end @@ -157,14 +157,13 @@ lane :deploy do sh "fastlane ios release_pods version:#{versionNumber} tag:#{tagName}" end - releaseNotes = release_notes(versionDeploy: tagName) sh "bash ./delete_release.sh " + tagName set_github_release( repository_name: ENV["REPO"], api_token: ENV["REPO_TOKEN"], name: tagName, tag_name: tagName, - description: releaseNotes, + description: tagName, commitish: ENV["COMMITISH"] ) end @@ -326,4 +325,4 @@ lane :lastExpectedVersion do |params| version = lastVersion end "#{version}" -end +end \ No newline at end of file