|
27 | 27 | | sed 's|refs/tags/||' \
|
28 | 28 | | tail -n1 > latest_tag.txt
|
29 | 29 | latest_tag=$(cat latest_tag.txt)
|
30 |
| - echo "Latest upstream tag: $latest_tag" |
| 30 | + echo "latest_tag=$latest_tag" >> $GITHUB_OUTPUT |
31 | 31 |
|
32 | 32 | - name: Read last built upstream tag from repo (if exists)
|
33 | 33 | id: read_last_tag
|
@@ -236,15 +236,32 @@ jobs:
|
236 | 236 | - name: Install GitHub CLI
|
237 | 237 | run: sudo apt-get update && sudo apt-get install -y gh
|
238 | 238 |
|
239 |
| - - name: Create tag if not exists |
| 239 | + - name: Set up Git user |
| 240 | + run: | |
| 241 | + git config --global user.name "Steven Seifried" |
| 242 | + git config --global user.email "[email protected]" |
| 243 | +
|
| 244 | + - name: Import GPG key and configure git signing |
| 245 | + env: |
| 246 | + GPGKEY: ${{ secrets.GPGKEY }} |
| 247 | + run: | |
| 248 | + echo "$GPGKEY" | base64 --decode | gpg --batch --import |
| 249 | + KEYID=$(gpg --list-secret-keys --with-colons | grep '^sec' | cut -d: -f5 | head -n1) |
| 250 | + echo "Using GPG Key: $KEYID" |
| 251 | + git config --global user.signingkey "$KEYID" |
| 252 | + git config --global gpg.program gpg |
| 253 | + git config --global tag.gpgSign true |
| 254 | + export GPG_TTY=$(tty) |
| 255 | +
|
| 256 | + - name: Create signed tag if not exists |
240 | 257 | run: |
|
241 | 258 | TAG="${{ needs.check-upstream-latest-tag.outputs.tag_name }}"
|
242 | 259 | if git rev-parse "$TAG" >/dev/null 2>&1; then
|
243 | 260 | echo "Tag $TAG exists, skipping creation."
|
244 | 261 | else
|
245 |
| - git tag "$TAG" |
| 262 | + git tag -s "$TAG" -m "Upstream release $TAG" |
246 | 263 | git push origin "$TAG"
|
247 |
| - echo "New tag $TAG created and pushed." |
| 264 | + echo "New signed tag $TAG created and pushed." |
248 | 265 | fi
|
249 | 266 |
|
250 | 267 | - name: Create GitHub Release
|
|
0 commit comments