Skip to content

Release Version 1.3.6 #22

Release Version 1.3.6

Release Version 1.3.6 #22

Workflow file for this run

name: Release Python Backend
on:
release:
types: [published]
jobs:
build-and-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Generate changelog
id: changelog
run: |
PREVIOUS_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
echo "Previous tag: $PREVIOUS_TAG"
if [ -z "$PREVIOUS_TAG" ]; then
CHANGELOG=$(git log --pretty=format:"* %s (%h)" --no-merges)
else
CHANGELOG=$(git log --pretty=format:"* %s (%h)" ${PREVIOUS_TAG}..HEAD --no-merges)
fi
# Save changelog to file
echo "### What's Changed" > changelog.md
echo "" >> changelog.md
# Features
echo "#### ✨ Features" >> changelog.md
echo "$CHANGELOG" | grep -i "^* \(feat\|add\|new\)" >> changelog.md || true
echo "" >> changelog.md
# Bug Fixes
echo "#### 🐛 Bug Fixes" >> changelog.md
echo "$CHANGELOG" | grep -i "^* \(fix\|bug\|patch\)" >> changelog.md || true
echo "" >> changelog.md
# Improvements
echo "#### 📈 Improvements" >> changelog.md
echo "$CHANGELOG" | grep -i "^* \(improve\|update\|enhance\|refactor\)" >> changelog.md || true
echo "" >> changelog.md
# Documentation
echo "#### 📚 Documentation" >> changelog.md
echo "$CHANGELOG" | grep -i "^* \(doc\|docs\)" >> changelog.md || true
echo "" >> changelog.md
# Other Changes
echo "#### 🔄 Other Changes" >> changelog.md
echo "$CHANGELOG" | grep -v -i "^* \(feat\|add\|new\|fix\|bug\|patch\|improve\|update\|enhance\|refactor\|doc\|docs\)" >> changelog.md || true
# Escape special characters for GitHub Actions
CHANGELOG_CONTENT=$(cat changelog.md)
echo "changelog<<EOF" >> $GITHUB_ENV
echo "$CHANGELOG_CONTENT" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
# Download Latest Frontend Build
- name: Download frontend release
run: |
# Get latest release info from the frontend repository
LATEST_RELEASE=$(curl -s https://api.github.com/repos/eloravpn/EloraVPNManagerPanel/releases/latest)
DOWNLOAD_URL=$(echo $LATEST_RELEASE | jq -r '.assets[0].browser_download_url')
# Download the frontend build
curl -L -o frontend.zip "$DOWNLOAD_URL"
# Create static directory and extract frontend files
mkdir -p static
unzip frontend.zip -d static/
# Create archive
- name: Create archive
run: |
zip -r elora-vpn-backend.zip \
static/ \
pyqrcode/ \
main.py \
.env.example \
alembic.ini \
requirements.txt \
src/
- name: Attach build to release
run: |
gh release upload ${{ github.event.release.tag_name }} elora-vpn-backend.zip --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update release notes
run: |
gh release edit ${{ github.event.release.tag_name }} --notes "$(cat << 'EOT'
Release ${{ github.event.release.tag_name }} of Elora VPN Manager Backend
${{ env.CHANGELOG }}
### Quick Installation
```bash
curl -fsSL https://raw.githubusercontent.com/eloravpn/EloraVPNManager/main/install.sh | sudo bash
```
### Custom Installation
```bash
# With specific domain and port
curl -fsSL https://raw.githubusercontent.com/eloravpn/EloraVPNManager/main/install.sh | sudo bash -s -- \
--domain your-domain.com \
--port 8080
```
For more installation options and documentation, please visit our GitHub repository.
EOT
)"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}