![](/style/images/good.png)
![](/style/images/bad.png)
Automatic release new version, and notify your followers about it, using Github...
source link: https://dev.to/martinpham/automatic-release-new-version-and-notify-your-followers-about-it-using-github-workflows-3o6m
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
![Cover image for Automatic release new version, and notify your followers about it, using Github workflows](https://res.cloudinary.com/practicaldev/image/fetch/s--UIrYBLFb--/c_imagga_scale,f_auto,fl_progressive,h_420,q_auto,w_1000/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m6jnvami9s8ududamozm.png)
Posted on Nov 14
Automatic release new version, and notify your followers about it, using Github workflows
Automatic release new version on tag workflow
Managing an open source project really takes a lot of efforts. There are many repeated tasks which wastes your time everywhere: Testing, Building, Releasing, ... and sometimes, you'd also want to update your followers with the new released version.
Fortunately, Github actions & workflows came to rescue! With tons of available actions, we can automate many repeated & boring tasks, and keep our time to focus on code.
Today I'd like to share with you a GitHub worklow to build and release your application into a Github release, then notify your followers about this new release.
With this worklow, we automate all the testing, building steps and releasing steps, everytime you push a new release tag (example: v0.0.1, v0.0.2,...). Then send a new message about the newly released version to a Telegram channel.
Submission Category: DIY Deployments
Yaml File or Link to Code
ActionsHackathon21
/
release-on-tag
Release a new version on very tag, then notify your followers on social networks
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.
Then send an announcement to your Telegram channel about the new release
Check the complete workflow here (release-on-tag.yml)
Actions used
- actions/checkout@v2 To checkout the source code from the repository
- actions/cache@v2 To cache the dependencies, allow us to re use them for future builds
- marvinpinto/action-automatic-releases@latest To release your build to Github Release page
(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…
In the repository, there is a sample NextJS project, however you can change a bit on the workflow file to match your project.
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)
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.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK