Release Version 1.1.0-rc1 #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 "") | |
if [ -z "$PREVIOUS_TAG" ]; then | |
# If this is the first tag, get all commits | |
COMMITS=$(git log --pretty=format:"- %s (%h)" --no-merges) | |
else | |
# Get commits between previous tag and current | |
COMMITS=$(git log --pretty=format:"- %s (%h)" ${PREVIOUS_TAG}..HEAD --no-merges) | |
fi | |
# Create changelog content with sections | |
echo "CHANGELOG<<EOF" >> $GITHUB_ENV | |
echo "### Changelog" >> $GITHUB_ENV | |
echo "" >> $GITHUB_ENV | |
# Features | |
echo "#### 🚀 Features" >> $GITHUB_ENV | |
echo "$COMMITS" | grep -i '^- feat\|^- add\|^- new' || true | |
echo "" >> $GITHUB_ENV | |
# Bug Fixes | |
echo "#### 🐛 Bug Fixes" >> $GITHUB_ENV | |
echo "$COMMITS" | grep -i '^- fix\|^- bug\|^- hotfix' || true | |
echo "" >> $GITHUB_ENV | |
# Improvements | |
echo "#### 📈 Improvements" >> $GITHUB_ENV | |
echo "$COMMITS" | grep -i '^- improve\|^- update\|^- enhance' || true | |
echo "" >> $GITHUB_ENV | |
# Other Changes | |
echo "#### 🔄 Other Changes" >> $GITHUB_ENV | |
echo "$COMMITS" | grep -v -i '^- feat\|^- add\|^- new\|^- fix\|^- bug\|^- hotfix\|^- improve\|^- update\|^- enhance' || true | |
echo "" >> $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/ \ | |
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 }} |