From d3ac2a0bfaf612d9d85b42e697c9f80f34a09f76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Cerqueira?= Date: Thu, 21 Oct 2021 14:39:12 +0100 Subject: [PATCH] ci(release): fix git configuration --- .github/workflows/release.yml | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6ef2766..27d1baf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,17 +9,9 @@ jobs: release: runs-on: ubuntu-latest steps: - - id: release-bot - name: Authenticate with Release Bot - uses: getsentry/action-github-app-token@v1 - with: - app_id: ${{ secrets.CB_RELEASE_BOT_ID }} - private_key: "${{ secrets.CB_RELEASE_BOT_PRIVATE_KEY }}" - - name: Checkout uses: actions/checkout@v2 with: - token: ${{ steps.release-bot.outputs.token }} fetch-depth: 0 - uses: actions/setup-go@v2 @@ -28,17 +20,23 @@ jobs: - name: Install Git SemVer run: go install . - - # - name: Setup Git Credentials - # uses: fusion-engineering/setup-git-credentials@v2 - # with: - # credentials: https://${{ secrets.CB_RELEASE_BOT_NAME }}:${{ steps.release-bot.outputs.token }}@github.com/ - - name: Bump Version + - id: release-bot + name: Authenticate with Release Bot + uses: getsentry/action-github-app-token@v1 + with: + app_id: ${{ secrets.CB_RELEASE_BOT_ID }} + private_key: "${{ secrets.CB_RELEASE_BOT_PRIVATE_KEY }}" + + - name: Configure Git run: | git config --global user.name "${{ secrets.CB_RELEASE_BOT_NAME }}" git config --global user.email "${{ secrets.CB_RELEASE_BOT_EMAIL }}" - git semver bump + git config --local --replace-all url.https://github.com/.insteadOf ssh://git@github.com/ + git config --local --add url.https://git:${{ steps.release-bot.outputs.token }}@github.com/.insteadOf git@github.com: + + - name: Bump Version + run: git semver bump - name: GoReleaser uses: goreleaser/goreleaser-action@v2