Automate your build & release with Github Actions

Automate your build & release with Github Actions

DevOps, one of the important practices that every developer should follow to extensively optimize their tasks. Clearly, it’s not limited to the topic we are discussing but it’s highly used in the industry. Automate your build & release with Github Actions

DevOps, one of the important practices that every developer should follow to extensively optimize their tasks. Clearly, it’s not limited to the topic we are discussing but it’s highly used in the industry.

So you may ask what are those practices? Well, there are a lot of uses cases but one of the common use-case in software development is supposed you are working on a project & a person wants to contribute to your work then how can you verify that his commit does not break the project with your latest commit upon merging. Surely you can verify it manually but it’s highly time-consuming. At this point, you can use some type of automation to automate this process (called CI). You can also use it for deploying your project like creating a new Github release or can publish them to stores (your imagination drives you), this process is called *CD *(continuous deployment).

Not only Github other platforms like Gitlab,  Bitbucket has their own pipelines for automation. There is one from Microsoft (called Azure DevOps) which is similar to Github Actions (iirc).

In this guide, we will be using the one provided by Github called Actions.

Side Note

This is not a typical article on how to do “this”, here I’ll be focusing on concepts so that you then can write your own workflow in _ways _you want.

I wrote this article with the experience I earned by using Github Actions over the past couple of months. In case, if there is something that has a better version of representing itself feel free to let me know & I’ll update the article.

What is Github Action?

A non-technical description of it would be “It is an API which will trigger a workflow based on any event that occurs in a repository”.

  • workflow: A YAML file (in.github/workflows) that contains some set of jobs that will run for each specified events.
  • events: Eg: a commit/PR made to a repo, creating a new release, forking a repo, etc. are all events.
  • jobs: A job is…. a job which contains a set of commands that will run on a particular OS after some constraints are satisfied.
  • constraints: These are some conditions that should be met in order to run the commands or jobs.
  • commands: Each command is executed on the native shell depending upon the OS you are running the workflow on (we can configure it according to our need).

Each job will be run on a fresh instance of virtual machines maintained by Github themselves (hosted runners). Each hosted runner has a defined hardware configuration. You can configure your custom runner to run your workflows in a docker container as well.

Also, there are a lot of prebuilt actions you can use from the official marketplace. We will use some of them in further examples.

android cli github-actions rust devops

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Top Android Projects with Source Code

Android projects with source code - Work on real-time android projects. We’ll start project ideas from beginners level and later move to advance projects.

GitHub Demo Days - Using GitHub Actions for testing cloud native applications

A common challenge that cloud native application developers face is manually testing against inconsistent environments. GitHub Actions can be triggered based on nearly any GitHub event making it possible to build in accountability for updating tests and fixing bugs.

How to Extend your DevOps Strategy For Success in the Cloud?

DevOps and Cloud computing are joined at the hip, now that fact is well appreciated by the organizations that engaged in SaaS cloud and developed applications in the Cloud. During the COVID crisis period, most of the organizations have started using cloud computing services and implementing a cloud-first strategy to establish their remote operations. Similarly, the extended DevOps strategy will make the development process more agile with automated test cases.

Building Dark Mode Theme in Android

Hello World, today we are going to see how we can implement a dark theme or night mode in our android application. This tutorial is going to be very simple and easy to understand. The dark theme is attractive to users and it is comfortable for low light conditions.

Top 130 Android Interview Questions - Crack Technical Interview Now!

Top Android Interview Questions & Answers from Beginner to Advanced level. Get ready to crack your next android interview with these android interview questions