Skip to content

Fix GPG key export instructions: use ASCII armor, not base64 #1

Fix GPG key export instructions: use ASCII armor, not base64

Fix GPG key export instructions: use ASCII armor, not base64 #1

Workflow file for this run

name: Create GitHub Release
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Extract version from tag
id: version
run: echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Extract changelog for version
id: changelog
run: |
# Extract the section for this version from CHANGELOG.md
VERSION="${{ steps.version.outputs.version }}"
# Get changelog content between version headers
CHANGELOG=$(awk "/## \[$VERSION\]/,/## \[/" CHANGELOG.md | sed '1d;$d' | sed '/^$/d')
# If changelog extraction failed, use a default message
if [ -z "$CHANGELOG" ]; then
CHANGELOG="Release version $VERSION
See [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/master/CHANGELOG.md) for details."
fi
# Save to output using heredoc to handle multiline content
{
echo 'notes<<EOF'
echo "$CHANGELOG"
echo EOF
} >> $GITHUB_OUTPUT
- name: Create GitHub Release
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const tag = context.ref.replace('refs/tags/', '');
const version = tag.replace('v', '');
await github.rest.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: tag,
name: `Release ${version}`,
body: `${{ steps.changelog.outputs.notes }}`,
draft: false,
prerelease: version.includes('-') || version.includes('alpha') || version.includes('beta') || version.includes('rc')
});