Skip to content

chore: consolidate v2.2.2 changes into v2.2.1 release #19

chore: consolidate v2.2.2 changes into v2.2.1 release

chore: consolidate v2.2.2 changes into v2.2.1 release #19

Workflow file for this run

name: Create Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Extract version from tag
id: version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Extract changelog for this version
id: changelog
run: |
# Extract the changelog section for this version
VERSION="${{ steps.version.outputs.VERSION }}"
# Use awk to extract the section between this version and the next
CHANGELOG=$(awk -v ver="## [$VERSION]" '
$0 ~ ver { found=1; next }
found && /^## \[/ { exit }
found { print }
' CHANGELOG.md)
# Handle multiline output
echo "BODY<<EOF" >> $GITHUB_OUTPUT
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Create release archive
run: |
mkdir -p release
cp install.sh release/
cp -r themes release/
cp README.md release/
cp CHANGELOG.md release/
cd release && tar -czvf ../proxmorph-${{ steps.version.outputs.VERSION }}.tar.gz .
cd .. && zip -r proxmorph-${{ steps.version.outputs.VERSION }}.zip release/
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
name: v${{ steps.version.outputs.VERSION }}
body: ${{ steps.changelog.outputs.BODY }}
files: |
proxmorph-${{ steps.version.outputs.VERSION }}.tar.gz
proxmorph-${{ steps.version.outputs.VERSION }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}