Skip to content

ActionsHackathon21/release-on-tag

Repository files navigation

Release new version on tag

Bonus: Also notify your followers on every update!

This project follows the DEV.to #ActionsHackathon21 hackathon.

Use GitHub Actions and Workflows to build and release your application on every release tag.

Screenshot

Then send an announcement to your Telegram channel about the new release

Telegram

Check the complete workflow here (release-on-tag.yml)

Actions used

(Also actions/setup-node@v2 for setup nodejs, although it's not required)

Configurations

  • You can config the release tag prefix, with on.push.tags key.
  • To send announcement to Telegram, you need to configure the workflow using following steps:
    • Talk with Telegram's @BotFather to create a new bot if you don't have one. We will use this bot to send messages to the Telegram channel. He will give you the token access the HTTP API.
    • On your Telegram channel, grant admin permissions to the bot.
    • Set the TELEGRAM_CHANNEL variable.
    • Add the TELEGRAM_BOT_TOKEN secret (using the token access above) into your repository secret (Settings > Secrets > New repository secret)

Flows

In this repository, I use a sample NextJS to demonstrate. However you can change the workflow a bit to fit your project.

  • Use actions/checkout@v2 to checkout source code from the repository
  • Use actions/setup-node@v2 to setup nodejs
  • Use actions/cache@v2 to cache dependencies (node_modules and .yarn directories)
  • Install dependencies with yarn
  • Run tests
  • Build application
  • Prepare release build files
  • Release the prepared files into Github Release
  • Send an announcement to the specified Telegram channel

Pre-release

There is also a pre-release workflow (prerelease-on-push.yml), which will build and create a pre-release version of your application, on every push to main branch.

Screenshot

About

Release a new version on very tag, then notify your followers on social networks

Resources

License

Stars

Watchers

Forks

Packages

No packages published