Skip to content

Fix release.yml not adding example env #74

Fix release.yml not adding example env

Fix release.yml not adding example env #74

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: |
files_to_include=(
"*"
".editorconfig"
".env.example"
".gitattributes"
".gitignore"
".prettierignore"
".prettierrc.json"
)
files_to_exclude=(
"node_modules/"
"tests/"
"CODE_OF_CONDUCT.md"
"CONTRIBUTOR_LICENSE_AGREEMENT"
"crowdin.yml"
"docker-compose.ci.yml"
"phpstan.neon"
"phpunit.xml"
"stats.html"
)
# Build the exclude parameters for tar
exclude_params=()
for file in "${files_to_exclude[@]}"; do
exclude_params+=(--exclude="$file")
done
tar "${exclude_params[@]}" -czf panel.tar.gz "${files_to_include[@]}"
- 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