Release new version of your project like a PRO 🚀

singhkshitij

Kshitij Singh

Posted on September 2, 2020

Release new version of your project like a PRO 🚀

My Workflow

I just created a custom Github action that can be used to send emails to multiple users/customers. It can be used as the best way to trigger the workflow whenever a release is made on your project repository.

GitHub logo singhkshitij / announcerr

Automatically announce and send emails to list of subscribers on every product release 🚀

Announcerr Github Action

Automatically announce and send emails to list of subscribers on every product release 🚀

Demo Project

Usage

- name: Announcerr
  uses: singhkshitij/announcerr@v2
  with:
    server_address: smtp.gmail.com
    server_port: 465
    username: ${{secrets.MAIL_USERNAME}}
    password: ${{secrets.MAIL_PASSWORD}}
    subject: Launching my awesomeProduct version ${{ github.event.release.tag_name }}
    # Literal body:
    body: Just launched new version of my ${{github.repository}} ! It is fully packed with awesome features.
    # Read file contents as body:
    body: file://README.md
    to: user1@xyz.com,user2@abc.com
    from: Kshitij Singh # <kshitij@mytrashcode.com>
    # Optional content type (defaults to text/plain):
    content_type: text/html
    # Optional attachments:
    attachments: attachments.zip,git.diff,./dist/static/main.js
Enter fullscreen mode Exit fullscreen mode

Caution: Some email server provider such as Gmail do not allow password directly to be used in such apps and might block send message operation, if we try to give plain password directly.

Please follow this guide to generate app password which can then be used

Submission Category:

  • Maintainer Must-Haves
  • Wacky Wildcards

Yaml File or Link to Code

Example repo that has the working workflow file :

GitHub logo singhkshitij / announcerr-demo

Demo for Announcer github action

Announcerr Demo

A demo repo which sends out the changelog email to all the users with the help of Announcer github action whenever a new app version is released ! 🧑‍🚀

How it works ?

  • Repo contains a workflow file that gets triggered whenever a release is made.
  • This workflow files uses Announcer github action and provides some input to the announcer such as , email username, password and list of users whom to send changelog email.
  • Important step is passing the changelog file to the announcer action, which in this case is Demo-page.html 📧.
  • Whenever a release is made on repo , announcer gh-action gets tiggered 🚀, reads the changelog file content and sends it to all the users.

PS : To maintain privacy 🔒 Gh-action is reading all the creds and emails from github secrets.




Sample YAML to kickstart process:

on:
  push:
    tags:
      - 'v*'

jobs:
  build:
    name: Create Release
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v2
      - name: Set env
        run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF#refs/*/}
      - name: Announce Product release 
        uses: singhkshitij/announcerr@v2.0
        with:
          server_address: smtp.gmail.com
          server_port: 465
          username: ${{secrets.MAIL_USERNAME}}
          password: ${{secrets.MAIL_PASSWORD}}
          subject: Launching my awesomeProduct version ${{ env.RELEASE_VERSION }}
          body: "file://demo-page.html"
          to: ${{secrets.USER_EMAILS}}
          from: Kshitij Singh 
          content_type: text/html
Enter fullscreen mode Exit fullscreen mode

Additional Resources / Info

Feel free to raise PR or feature request here

💖 💪 🙅 🚩
singhkshitij
Kshitij Singh

Posted on September 2, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Release new version of your project like a PRO 🚀
actionshackathon Release new version of your project like a PRO 🚀

September 2, 2020

Language Check
actionshackathon Language Check

August 16, 2020