Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI/CD Integration for Automated Release Builds and Notifications #47

Closed
esmaeil-ahmadipour opened this issue Dec 26, 2024 · 5 comments · Fixed by #50
Closed

CI/CD Integration for Automated Release Builds and Notifications #47

esmaeil-ahmadipour opened this issue Dec 26, 2024 · 5 comments · Fixed by #50
Assignees
Labels
feature Add/Create new feature

Comments

@esmaeil-ahmadipour
Copy link
Collaborator

esmaeil-ahmadipour commented Dec 26, 2024

Overview

Feature Description

Set up CI/CD integration to automatically create release builds for Windows, Linux, and macOS after any successful merge request to the develop branch. The builds should then be shared on both Telegram and Discord channels. This will streamline the release process and ensure timely notifications.

Click to expand the scenario

Scenario: Automated Release Sharing

When a developer merges a feature branch into the develop branch, the CI/CD pipeline automatically generates release builds for Windows, Linux, and macOS. These builds are then shared in a designated Telegram group and a Discord channel, ensuring the team is informed and has access to the latest versions.


API Integration

  • Telegram Bot API Endpoint:

    • Endpoint: https://api.telegram.org/bot{BOT_TOKEN}/sendMessage
    • Required Fields: chat_id, text, and optionally file for attaching builds.
  • Discord Webhook Endpoint:

    • Endpoint: {DISCORD_WEBHOOK_URL}
    • Required Data: content for the message and optional file attachments.

Additional Notes:

  • Merge Request Target: This feature should only be triggered after a successful merge request to the develop branch.
  • Build Section: If possible, split the build section into a separate file for better maintainability.

UPDATE

Ways to access and download the latest release, upon acceptance of the PR, are listed below:

@phoenixit99
Copy link

phoenixit99 commented Dec 30, 2024

✅ Implemented CI/CD Integration for Automated Release Builds and Notifications

Progress: 100%

📋 Required Setup

  1. Telegram Setup

    • Create bot via @Botfather
    • Configure chat/channel
    • Add secrets to GitHub
  2. Discord Setup

    • Create webhook in desired channel
    • Add webhook URL to GitHub secrets
  3. GitHub Secrets

    • TELEGRAM_BOT_TOKEN
    • TELEGRAM_CHAT_ID
    • DISCORD_WEBHOOK

🎯 Completed Tasks

1. Release Automation

  • ✅ Configured GitHub Actions workflow for automated releases
  • ✅ Set up multi-platform build support:
    • Linux build pipeline
    • Windows build pipeline
    • macOS build pipeline
  • ✅ Automated release creation with versioned artifacts
  • ✅ Implemented build verification steps

2. Notification System

  • ✅ Integrated Telegram notifications
  • ✅ Integrated Discord notifications
  • ✅ Configured notification templates with:
    • Release version
    • PR details
    • Build download links
    • Release page links

🔍 Implementation Details

Workflow Files

  • .github/workflows/release.yml: Main release workflow
    • Triggers on PR merge to develop branch
    • Handles build, release, and notifications

Release Process

  1. PR is merged to develop
  2. Workflow automatically:
    • Builds applications for all platforms
    • Creates GitHub releases
    • Uploads build artifacts
    • Sends notifications

Hi @esmaeil-ahmadipour I don't have full permission in the repo. So Please help me config require setup

@phoenixit99
Copy link

Release page links

Screenshot 1

Integrated Discord notifications

Screenshot 1

Integrated Telegram notifications

Screenshot 1

Github workflow build - release - notification

Screenshot 1

@esmaeil-ahmadipour
Copy link
Collaborator Author

@phoenixit99 Great work, thanks for your efforts! I need the following two points to be added to your task:

  1. Standardize Release Names and Tags:

    • Tag names should follow a consistent format, for example: v1.6.4+27.
    • Release names should follow this format: Release 1.6.4+27.
  2. Output for Telegram and Discord:
    We need outputs for Telegram and Discord so team members can easily access the app for installation. To keep things organized, it's better to generate tags and releases only for PRs related to merging develop into main.

@phoenixit99
Copy link

@phoenixit99 Great work, thanks for your efforts! I need the following two points to be added to your task:

  1. Standardize Release Names and Tags:

    • Tag names should follow a consistent format, for example: v1.6.4+27.
    • Release names should follow this format: Release 1.6.4+27.
  2. Output for Telegram and Discord:
    We need outputs for Telegram and Discord so team members can easily access the app for installation. To keep things organized, it's better to generate tags and releases only for PRs related to merging develop into main.

I agree with the workflow for the main branch.

Regarding the develop branch, I have a suggestion: we should send notifications to Telegram and Discord when there are any pull requests. This will increase team activity and help us keep track of progress.

Additionally, we should also send notifications for the daily build releases.

cc @b00f

@esmaeil-ahmadipour
Copy link
Collaborator Author

esmaeil-ahmadipour commented Jan 4, 2025

Regarding the develop branch, I have a suggestion: we should send notifications to Telegram and Discord when there are any pull requests. This will increase team activity and help us keep track of progress.

Additionally, we should also send notifications for the daily build releases.

cc @b00f


I suggest creating a new issue.

Reason for the new issue:

The CI/CD setup needs to be updated so that release builds and tags are applied only to the main branch. Additionally, the naming convention for tags and releases must follow the format outlined below:

Naming Convention:

  • Tag: v0.0.1+1
  • Release: release-<OS>-v0.0.1+1

Tasks:

  1. Update the pipeline to target the main branch exclusively.
  2. Ensure that tagging and release creation occur only after successful merges into the main branch.
  3. Implement the specified naming convention for both tags and releases.
  4. Verify that notifications for these releases are sent to Telegram and Discord channels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Add/Create new feature
Projects
None yet
2 participants