Skip to content

Commit 58c333a

Browse files
committed
chore: configure lerna to sign commits and tags with GPG
1 parent 47f4e16 commit 58c333a

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.github/workflows/deploy-package.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@ jobs:
2020
persist-credentials: false
2121
token: ${{ secrets.GH_TOKEN }}
2222
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
23+
24+
- name: Import GPG key
25+
run: |
26+
echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --import
27+
GPG_KEY_ID=$(gpg --list-secret-keys --keyid-format=long | grep sec | head -n1 | awk '{print $2}' | cut -d'/' -f2)
28+
git config --global user.signingkey "$GPG_KEY_ID"
29+
git config --global commit.gpgsign true
30+
git config --global tag.gpgsign true
31+
env:
32+
GPG_TTY: $(tty)
33+
2334
- name: Git Identity
2435
run: |
2536
git config --global user.name 'scaleway-bot'

lerna.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
"conventionalCommits": true,
88
"message": "chore(release): publish",
99
"createRelease": "github",
10-
"loglevel": "verbose"
10+
"loglevel": "verbose",
11+
"signGitCommit": true,
12+
"signGitTag": true
1113
}
1214
},
1315
"$schema": "node_modules/lerna/schemas/lerna-schema.json"

0 commit comments

Comments
 (0)