Skip to content

Commit

Permalink
Merge pull request #6 from codecov/feature/gpg-commit-signing
Browse files Browse the repository at this point in the history
Add GPG
  • Loading branch information
trent-codecov authored Oct 10, 2023
2 parents a885c5c + af9308f commit 9b153bc
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/create-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,16 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Initialize mandatory git config
run: |
git config user.name "Codecov Release"
git config user.email [email protected]

- name: Import GPG key
id: import-gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.RELEASER_GPG_PRIVATE_KEY }}
git_user_signingkey: true
git_commit_gpgsign: true
git_config_global: true

- name: Create release branch
run: git checkout -b release/${{ github.event.inputs.versionName }}
- name: Update version file
Expand All @@ -28,14 +34,15 @@ jobs:
echo ${{ github.event.inputs.versionName }} > VERSION
echo -n $(tr -d '\n' < VERSION) > VERSION
git add VERSION
git commit --allow-empty --message "Prepare release ${{ github.event.inputs.versionName }}"
git commit -S --message "Prepare release ${{ github.event.inputs.versionName }}"
echo "commit=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
- name: Push release branch
run: git push origin release/${{ github.event.inputs.versionName }}
- name: Create pull request into main
uses: thomaseizinger/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_token: ${{ secrets.GH_RELEASE_TOKEN }}
head: release/${{ github.event.inputs.versionName }}
base: ${{ inputs.mainBranch }}
title: Release ${{ github.event.inputs.versionName }}
Expand Down

0 comments on commit 9b153bc

Please sign in to comment.