From f751a7d6a3a241dd9350dce38e9f023dcc2b10e4 Mon Sep 17 00:00:00 2001 From: Kirill Kovalev Date: Tue, 9 Jul 2024 17:12:41 +0300 Subject: [PATCH 01/17] Update ci-cd.yml U --- .github/workflows/ci-cd.yml | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 97e538b7..ea88f22e 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -6,23 +6,18 @@ on: # branches: [ master ] jobs: - versioning: + get_version: runs-on: ubuntu-latest outputs: - version: ${{ steps.set_version.outputs.new_version }} + version: ${{ steps.get_version.outputs.version }} steps: - uses: actions/checkout@v4.1.2 - - name: Bump version and push tag - id: set_version - uses: mathieudutour/github-tag-action@v6.2 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - default_bump: patch # Automatically bump patch version - release_branches: release.*,hotfix.*,master - pre_release_branches: feature.* + - name: Get latest tag + id: get_version + run: echo "version=$(git describe --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_ENV build: - needs: versioning + needs: get_version runs-on: ubuntu-latest steps: - uses: actions/checkout@v4.1.2 @@ -37,12 +32,13 @@ jobs: - name: Test run: dotnet test --no-build -c Release --verbosity normal - name: Pack - run: dotnet pack --no-build -c Release -o nupkg /p:PackageVersion=${{ needs.versioning.outputs.version }} + run: dotnet pack --no-build -c Release -o nupkg /p:PackageVersion=${{ needs.get_version.outputs.version }} - name: Upload NuGet packages as artifacts uses: actions/upload-artifact@v4.3.1 with: name: nuget-packages path: nupkg/*.nupkg + publish: needs: build runs-on: ubuntu-latest @@ -52,5 +48,7 @@ jobs: with: name: nuget-packages path: nupkg - - name: Push to NuGet - run: dotnet nuget push "**/*.nupkg" -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate + - name: Push to NuGet.org +# run: dotnet nuget push "**/*.nupkg" -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate + - name: Push to GitHub Packages +# run: dotnet nuget push "**/*.nupkg" -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --skip-duplicate From c7c4b84ebbe965731c6fcd86d595acc94a8b9295 Mon Sep 17 00:00:00 2001 From: Kirill Kovalev Date: Tue, 9 Jul 2024 17:17:38 +0300 Subject: [PATCH 02/17] Update ci-cd.yml --- .github/workflows/ci-cd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index ea88f22e..b6eaaaa2 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -48,7 +48,7 @@ jobs: with: name: nuget-packages path: nupkg - - name: Push to NuGet.org +# - name: Push to NuGet.org # run: dotnet nuget push "**/*.nupkg" -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate - - name: Push to GitHub Packages +# - name: Push to GitHub Packages # run: dotnet nuget push "**/*.nupkg" -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --skip-duplicate From 7df11c87a25474ee16c280b54de04c8c8d3122d3 Mon Sep 17 00:00:00 2001 From: Kirill Kovalev Date: Tue, 9 Jul 2024 18:13:49 +0300 Subject: [PATCH 03/17] Update fetch depth --- .github/workflows/ci-cd.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index b6eaaaa2..7446986f 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -12,10 +12,20 @@ jobs: version: ${{ steps.get_version.outputs.version }} steps: - uses: actions/checkout@v4.1.2 + with: + fetch-depth: 0 # Fetch all history and tags + - name: Debug - List tags + run: git tag -l + - name: Debug - Show commits + run: git log --oneline - name: Get latest tag id: get_version - run: echo "version=$(git describe --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_ENV - + run: | + tag=$(git describe --tags $(git rev-list --tags --max-count=1) 2>/dev/null || echo "v0.0.1") + echo "version=$tag" >> $GITHUB_ENV + echo "::set-output name=version::$tag" + echo "Resolved version: $tag" + build: needs: get_version runs-on: ubuntu-latest From bcae3854dcd8b1028dc5369c7624b2bd986ffe32 Mon Sep 17 00:00:00 2001 From: Kirill Kovalev Date: Tue, 9 Jul 2024 18:22:12 +0300 Subject: [PATCH 04/17] Remove leading 'v' --- .github/workflows/ci-cd.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 7446986f..a91b6fe3 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -22,9 +22,10 @@ jobs: id: get_version run: | tag=$(git describe --tags $(git rev-list --tags --max-count=1) 2>/dev/null || echo "v0.0.1") - echo "version=$tag" >> $GITHUB_ENV - echo "::set-output name=version::$tag" - echo "Resolved version: $tag" + version=${tag#v} # Remove leading 'v' if present + echo "version=$version" >> $GITHUB_ENV + echo "::set-output name=version::$version" + echo "Resolved version: $version" build: needs: get_version From b292a553919020d5b0ac5a712d7c6c67b97430b8 Mon Sep 17 00:00:00 2001 From: Kirill Kovalev Date: Tue, 9 Jul 2024 18:51:07 +0300 Subject: [PATCH 05/17] Added nupkg auto-publishing --- .github/workflows/ci-cd.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index a91b6fe3..2a4fcb2c 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -1,9 +1,9 @@ name: CI/CD with Auto Versioning on: - workflow_dispatch: -# push: -# branches: [ master ] + workflow_dispatch: # Manual trigger + release: + types: [published] # Trigger on published releases jobs: get_version: @@ -59,7 +59,7 @@ jobs: with: name: nuget-packages path: nupkg -# - name: Push to NuGet.org -# run: dotnet nuget push "**/*.nupkg" -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate -# - name: Push to GitHub Packages -# run: dotnet nuget push "**/*.nupkg" -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --skip-duplicate + - name: Push to NuGet.org + run: dotnet nuget push "**/*.nupkg" -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate + - name: Push to GitHub Packages + run: dotnet nuget push "**/*.nupkg" -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --skip-duplicate From 7272331c7137e869fc7f1e6c2677ed4cd87b10e2 Mon Sep 17 00:00:00 2001 From: Kirill Kovalev Date: Tue, 9 Jul 2024 19:48:08 +0300 Subject: [PATCH 06/17] Make script manually-running, publish only from release branches --- .github/workflows/ci-cd.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 2a4fcb2c..7648960b 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -1,9 +1,7 @@ -name: CI/CD with Auto Versioning +name: CI/CD Pipeline for Auto Versioning, Building, and Publishing on Release Branch on: workflow_dispatch: # Manual trigger - release: - types: [published] # Trigger on published releases jobs: get_version: @@ -52,6 +50,7 @@ jobs: publish: needs: build + if: startsWith(github.ref, 'refs/heads/release/') runs-on: ubuntu-latest steps: - name: Download NuGet packages artifacts From 82f6bc2469294be377d09de88a7a4e97a3af3db6 Mon Sep 17 00:00:00 2001 From: Kirill Kovalev Date: Wed, 10 Jul 2024 10:43:44 +0300 Subject: [PATCH 07/17] Added step to merge into master branch --- .github/workflows/ci-cd.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 7648960b..bbf4994c 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -62,3 +62,28 @@ jobs: run: dotnet nuget push "**/*.nupkg" -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate - name: Push to GitHub Packages run: dotnet nuget push "**/*.nupkg" -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --skip-duplicate + + merge_to_master: + needs: publish + runs-on: ubuntu-latest + steps: + - name: Checkout master branch + uses: actions/checkout@v4.1.2 + with: + ref: master + fetch-depth: 0 # Fetch all history to avoid shallow clone issues + - name: Checkout release branch + uses: actions/checkout@v4.1.2 + with: + ref: ${{ github.ref }} # Checkout the release branch that triggered the workflow + path: release_branch + - name: Merge release branch into master + run: | + git config --global user.email "actions@github.com" + git config --global user.name "GitHub Actions" + git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository_owner }}/{{ github.repository_name }}.git + git fetch origin master + git checkout master + git merge --no-ff --no-edit release_branch + git push origin master + \ No newline at end of file From 1b1f7c76953cab412cea7ddb3cab83edb431a072 Mon Sep 17 00:00:00 2001 From: Kirill Kovalev Date: Wed, 10 Jul 2024 10:48:35 +0300 Subject: [PATCH 08/17] disable restriction for release branches --- .github/workflows/ci-cd.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index bbf4994c..ed0265e4 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -1,4 +1,4 @@ -name: CI/CD Pipeline for Auto Versioning, Building, and Publishing on Release Branch +name: Build, Publish and Merge Release to Master on: workflow_dispatch: # Manual trigger @@ -50,7 +50,7 @@ jobs: publish: needs: build - if: startsWith(github.ref, 'refs/heads/release/') +# if: startsWith(github.ref, 'refs/heads/release/') runs-on: ubuntu-latest steps: - name: Download NuGet packages artifacts @@ -58,10 +58,10 @@ jobs: with: name: nuget-packages path: nupkg - - name: Push to NuGet.org - run: dotnet nuget push "**/*.nupkg" -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate - - name: Push to GitHub Packages - run: dotnet nuget push "**/*.nupkg" -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --skip-duplicate +# - name: Push to NuGet.org +# run: dotnet nuget push "**/*.nupkg" -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate +# - name: Push to GitHub Packages +# run: dotnet nuget push "**/*.nupkg" -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --skip-duplicate merge_to_master: needs: publish From 8587f983d28aac43c75be54e36bf5ed6497d2895 Mon Sep 17 00:00:00 2001 From: Kirill Kovalev Date: Wed, 10 Jul 2024 10:52:02 +0300 Subject: [PATCH 09/17] Fix repo name --- .github/workflows/ci-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index ed0265e4..7a1fc6b1 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -81,7 +81,7 @@ jobs: run: | git config --global user.email "actions@github.com" git config --global user.name "GitHub Actions" - git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository_owner }}/{{ github.repository_name }}.git + git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository_owner }}/{{ github.event.repository.name }}.git git fetch origin master git checkout master git merge --no-ff --no-edit release_branch From 93fee2cffa2e00fc1e37c124019ec05bc86359fa Mon Sep 17 00:00:00 2001 From: Kirill Kovalev Date: Wed, 10 Jul 2024 10:54:23 +0300 Subject: [PATCH 10/17] Replaced obsolete set-output command to $GITHUB_OUTPUT --- .github/workflows/ci-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 7a1fc6b1..2d2fd5c9 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -22,7 +22,7 @@ jobs: tag=$(git describe --tags $(git rev-list --tags --max-count=1) 2>/dev/null || echo "v0.0.1") version=${tag#v} # Remove leading 'v' if present echo "version=$version" >> $GITHUB_ENV - echo "::set-output name=version::$version" + echo "version=$version" >> $GITHUB_OUTPUT echo "Resolved version: $version" build: From 7efcb22f924f50bad0d4313c72c16a33dd272e12 Mon Sep 17 00:00:00 2001 From: Kirill Kovalev Date: Wed, 10 Jul 2024 11:02:52 +0300 Subject: [PATCH 11/17] Fixed repo name --- .github/workflows/ci-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 2d2fd5c9..43ab7197 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -81,7 +81,7 @@ jobs: run: | git config --global user.email "actions@github.com" git config --global user.name "GitHub Actions" - git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository_owner }}/{{ github.event.repository.name }}.git + git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git git fetch origin master git checkout master git merge --no-ff --no-edit release_branch From 43e41c180a974ab37a57ac38e6dd6b93ab47714e Mon Sep 17 00:00:00 2001 From: Kirill Kovalev Date: Wed, 10 Jul 2024 11:06:46 +0300 Subject: [PATCH 12/17] Added check_merge_conflict step --- .github/workflows/ci-cd.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 43ab7197..9660de68 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -4,6 +4,29 @@ on: workflow_dispatch: # Manual trigger jobs: + check_merge_conflict: + runs-on: ubuntu-latest + steps: + - name: Checkout master branch + uses: actions/checkout@v4 + with: + ref: master + fetch-depth: 0 # Fetch all history to avoid shallow clone issues + - name: Checkout release branch + uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} # Checkout the release branch that triggered the workflow + path: release_branch + - name: Check for merge conflicts + run: | + git fetch origin master + git checkout master + git merge --no-commit --no-ff release_branch || ( + echo "Merge to master conflict detected. Aborting." + git merge --abort + exit 1 + ) + get_version: runs-on: ubuntu-latest outputs: From 7cde379c69b1ba0146e3bdbb8663692a54102da3 Mon Sep 17 00:00:00 2001 From: Kirill Kovalev Date: Wed, 10 Jul 2024 11:06:46 +0300 Subject: [PATCH 13/17] Added check_merge_conflict step --- .github/workflows/ci-cd.yml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 43ab7197..5b0e0e78 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -4,7 +4,31 @@ on: workflow_dispatch: # Manual trigger jobs: + check_merge_conflict: + runs-on: ubuntu-latest + steps: + - name: Checkout master branch + uses: actions/checkout@v4 + with: + ref: master + fetch-depth: 0 # Fetch all history to avoid shallow clone issues + - name: Checkout release branch + uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} # Checkout the release branch that triggered the workflow + path: release_branch + - name: Check for merge conflicts + run: | + git fetch origin master + git checkout master + git merge --no-commit --no-ff release_branch || ( + echo "Merge to master conflict detected. Aborting." + git merge --abort + exit 1 + ) + get_version: + needs: check_merge_conflict runs-on: ubuntu-latest outputs: version: ${{ steps.get_version.outputs.version }} @@ -86,4 +110,4 @@ jobs: git checkout master git merge --no-ff --no-edit release_branch git push origin master - \ No newline at end of file + \ No newline at end of file From e94de771abd6ebef3820593b4d5506d01908f8aa Mon Sep 17 00:00:00 2001 From: Kirill Kovalev Date: Wed, 10 Jul 2024 12:08:35 +0300 Subject: [PATCH 14/17] Input the release branch --- .github/workflows/ci-cd.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 5b0e0e78..f8b18f16 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -2,6 +2,11 @@ name: Build, Publish and Merge Release to Master on: workflow_dispatch: # Manual trigger + inputs: + release_branch: + description: 'The release branch to be processed' + required: true + default: 'release/1.0.0' # Example default branch jobs: check_merge_conflict: @@ -15,7 +20,8 @@ jobs: - name: Checkout release branch uses: actions/checkout@v4 with: - ref: ${{ github.ref }} # Checkout the release branch that triggered the workflow +# ref: ${{ github.ref }} # Checkout the release branch that triggered the workflow + ref: ${{ github.event.inputs.release_branch }} # Checkout the release branch specified in the workflow dispatch input path: release_branch - name: Check for merge conflicts run: | @@ -99,7 +105,8 @@ jobs: - name: Checkout release branch uses: actions/checkout@v4.1.2 with: - ref: ${{ github.ref }} # Checkout the release branch that triggered the workflow +# ref: ${{ github.ref }} # Checkout the release branch that triggered the workflow + ref: ${{ github.event.inputs.release_branch }} # Checkout the release branch specified in the workflow dispatch input path: release_branch - name: Merge release branch into master run: | From 7488fe6161d31961ee9ecf830083467e7da6d907 Mon Sep 17 00:00:00 2001 From: Kirill Kovalev Date: Wed, 10 Jul 2024 13:00:39 +0300 Subject: [PATCH 15/17] Add github context dump for debugging --- .github/workflows/ci-cd.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index f8b18f16..46c854fe 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -9,7 +9,17 @@ on: default: 'release/1.0.0' # Example default branch jobs: + startup: + runs-on: ubuntu-latest + steps: + - name: Dump github context + run: echo "$GITHUB_CONTEXT" + shell: bash + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + check_merge_conflict: + needs: startup runs-on: ubuntu-latest steps: - name: Checkout master branch From 7baadc8536cacab85bda084e033bcf729e027dc9 Mon Sep 17 00:00:00 2001 From: Kirill Kovalev Date: Wed, 10 Jul 2024 13:06:11 +0300 Subject: [PATCH 16/17] Fetch and checkout release branch by git fetch --- .github/workflows/ci-cd.yml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 46c854fe..ca273c16 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -27,12 +27,10 @@ jobs: with: ref: master fetch-depth: 0 # Fetch all history to avoid shallow clone issues - - name: Checkout release branch - uses: actions/checkout@v4 - with: -# ref: ${{ github.ref }} # Checkout the release branch that triggered the workflow - ref: ${{ github.event.inputs.release_branch }} # Checkout the release branch specified in the workflow dispatch input - path: release_branch + - name: Fetch and checkout release branch + run: | + git fetch origin ${{ github.event.inputs.release_branch }}:release_branch + git checkout release_branch - name: Check for merge conflicts run: | git fetch origin master @@ -112,12 +110,10 @@ jobs: with: ref: master fetch-depth: 0 # Fetch all history to avoid shallow clone issues - - name: Checkout release branch - uses: actions/checkout@v4.1.2 - with: -# ref: ${{ github.ref }} # Checkout the release branch that triggered the workflow - ref: ${{ github.event.inputs.release_branch }} # Checkout the release branch specified in the workflow dispatch input - path: release_branch + - name: Fetch and checkout release branch + run: | + git fetch origin ${{ github.event.inputs.release_branch }}:release_branch + git checkout release_branch - name: Merge release branch into master run: | git config --global user.email "actions@github.com" From 5d63bb9b33ced78bc491526086897b6a58171e28 Mon Sep 17 00:00:00 2001 From: Kirill Kovalev Date: Mon, 9 Sep 2024 12:06:11 +0300 Subject: [PATCH 17/17] Added configure Git step --- .github/workflows/ci-cd.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index ca273c16..ad20f3ff 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -22,6 +22,15 @@ jobs: needs: startup runs-on: ubuntu-latest steps: + - name: Configure Git + run: | + git config --global user.email "actions@github.com" + git config --global user.name "GitHub Actions" + echo "$GPG_PRIVATE_KEY" | gpg --batch --import + git config --global user.signingkey ${{ secrets.GPG_KEY_ID }} + git config --global commit.gpgSign true + env: + GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} - name: Checkout master branch uses: actions/checkout@v4 with: @@ -105,6 +114,10 @@ jobs: needs: publish runs-on: ubuntu-latest steps: + - name: Configure Git + run: | + git config --global user.email "actions@github.com" + git config --global user.name "GitHub Actions" - name: Checkout master branch uses: actions/checkout@v4.1.2 with: