Skip to content

Add test changelog

Add test changelog #62

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*.*.*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Update Embedded Version String
env:
REF: ${{ github.ref }}
run: |
sed -i "s/ 'version' => 'canary',/ 'version' => '${REF:11}',/" config/app.php
- name: Build Assets
run: |
npm install
npm run build
- name: Create Release Archive
run: |
rm -rf node_modules/ \
tests/ \
CODE_OF_CONDUCT.md \
CONTRIBUTOR_LICENSE_AGREEMENT \
crowdin.yml \
docker-compose.ci.yml \
phpstan.neon \
phpunit.xml
tar -czf panel.tar.gz *
- name: Extract Changelog
id: extract_changelog
env:
REF: ${{ github.ref }}
run: |
sed -n "/^## ${REF:10}/,/^## /{/^## /b;p}" CHANGELOG.md > ./RELEASE_CHANGELOG
echo "version_name=${REF:10}" >> $GITHUB_OUTPUT
- name: Create Checksum and Add to Changelog
run: |
SUM=`sha256sum panel.tar.gz`
echo -e "\n#### SHA256 Checksum\n\n\`\`\`\n$SUM\n\`\`\`\n" >> ./RELEASE_CHANGELOG
echo $SUM > checksum.txt
- name: Create Release
uses: softprops/action-gh-release@v1
with:
name: ${{ steps.extract_changelog.outputs.version_name }}
body_path: ./RELEASE_CHANGELOG
draft: true
prerelease: ${{ contains(github.ref, 'beta') || contains(github.ref, 'alpha') || contains(github.ref, 'rc') }}
files: |
panel.tar.gz
checksum.txt