<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shunjid Rahman Showrov</title>
    <description>The latest articles on DEV Community by Shunjid Rahman Showrov (@shunjid).</description>
    <link>https://dev.to/shunjid</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F426237%2F44016e06-846b-47b3-90de-cca33b198f31.jpeg</url>
      <title>DEV Community: Shunjid Rahman Showrov</title>
      <link>https://dev.to/shunjid</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shunjid"/>
    <language>en</language>
    <item>
      <title>ML.NET in Google Colab</title>
      <dc:creator>Shunjid Rahman Showrov</dc:creator>
      <pubDate>Wed, 16 Dec 2020 15:48:08 +0000</pubDate>
      <link>https://dev.to/shunjid/ml-net-in-google-colab-1kmf</link>
      <guid>https://dev.to/shunjid/ml-net-in-google-colab-1kmf</guid>
      <description>&lt;p&gt;Today, I was thinking to build and test a classification model using ML.NET. I'm very very curious about new technologies and from my curiosity I asked myself, &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"What if I try doing all these things in Colab? Is it even possible?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/VIQ2OBrGPCq0o6QQZY/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/VIQ2OBrGPCq0o6QQZY/giphy.gif" alt="https://media.giphy.com/media/VIQ2OBrGPCq0o6QQZY/giphy.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From the official documentation of ML.NET I found that there is an option to do all these things from command line using ML.NET CLI. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;And guess what?&lt;/strong&gt; This was as simple as drinking a glass of water 😂. All you need to do is to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install .NET Core SDK in Google Colab.&lt;/li&gt;
&lt;li&gt;Install ML.NET.&lt;/li&gt;
&lt;li&gt;Import dataset.&lt;/li&gt;
&lt;li&gt;Use ML.NET CLI to train the model.&lt;/li&gt;
&lt;li&gt;Test.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I've added a &lt;a href="https://gist.github.com/shunjid/5f633474ba6f4be7db2871fe54e2ef52"&gt;gist&lt;/a&gt; below. You can try directly in &lt;a href="https://colab.research.google.com/drive/1MQF2B_chRddk7WFKS6H5wLs_vdI7Xfg8?usp=sharing"&gt;colab&lt;/a&gt; from the "Open in Colab" badge.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Let's Give it a try 🎉&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://gist.github.com/shunjid/5f633474ba6f4be7db2871fe54e2ef52"&gt;https://gist.github.com/shunjid/5f633474ba6f4be7db2871fe54e2ef52&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


</description>
      <category>dotnet</category>
      <category>machinelearning</category>
      <category>jupyter</category>
      <category>datascience</category>
    </item>
    <item>
      <title>Minisauras: A Github action to minify CSS and JS files</title>
      <dc:creator>Shunjid Rahman Showrov</dc:creator>
      <pubDate>Mon, 07 Sep 2020 16:42:35 +0000</pubDate>
      <link>https://dev.to/shunjid/minisauras-a-github-action-to-minify-css-and-js-files-34b9</link>
      <guid>https://dev.to/shunjid/minisauras-a-github-action-to-minify-css-and-js-files-34b9</guid>
      <description>&lt;p&gt;&lt;strong&gt;👋 Hi Everyone&lt;/strong&gt;,&lt;/p&gt;

&lt;p&gt;We are &lt;a href="https://github.com/teamtigers"&gt;&lt;strong&gt;TeamTigers&lt;/strong&gt;&lt;/a&gt;, a group of undergrad students studying Bachelor of Science in Software Engineering. And here is our submission for &lt;strong&gt;#ActionsHackathon&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Our Workflow&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Minisauras&lt;/strong&gt; is an open-source CI/CD automation tool based on &lt;a href="https://github.com/features/actions"&gt;&lt;strong&gt;GitHub Actions&lt;/strong&gt;&lt;/a&gt; that pulls all the desired JavaScript and CSS files from your base branch, minify them and creates a pull-request with a new branch.&lt;/p&gt;

&lt;h4&gt;
  
  
  How it works
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Traverse through a given directory (if not provided, traverse from root), finds all the JavaScript &amp;amp; CSS files within it and it's sub-directories. &lt;/li&gt;
&lt;li&gt;Afterwards, &lt;strong&gt;Minisauras&lt;/strong&gt; minify all those files.&lt;/li&gt;
&lt;li&gt;Finally, it creates a new branch in your repository, push those changes and creates a pull request that can be merged in your base branch.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Submission Category:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;We are submitting this action in following categories:&lt;/p&gt;

&lt;p&gt;📌 &lt;strong&gt;DIY Deployments&lt;/strong&gt; (Primary)&lt;br&gt;
📌 &lt;strong&gt;Wacky Wildcards&lt;/strong&gt; (Secondary)&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Yaml File or Link to Code&lt;/strong&gt;
&lt;/h3&gt;
&lt;h4&gt;
  
  
  Users' Guideline
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Create a &lt;a href="https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token"&gt;personal access token&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Then &lt;a href="https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets"&gt;setup a secret&lt;/a&gt; using that personal access token in your desired repository.&lt;/li&gt;
&lt;li&gt;Create a workflow. For example: &lt;strong&gt;main.yml&lt;/strong&gt; under (.github/workflows) directory.&lt;/li&gt;
&lt;li&gt;In the workflow, provide following things:

&lt;ul&gt;
&lt;li&gt;Personal access token. For example: &lt;strong&gt;secrets.TOKEN&lt;/strong&gt; if you set your secret with a name 'TOKEN'.&lt;/li&gt;
&lt;li&gt;The desired directory in which you want to minify CSS and JS files. For example: &lt;code&gt;'./'&lt;/code&gt; for root and &lt;code&gt;'src/'&lt;/code&gt; for src directory.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;minisauras&lt;/span&gt;
  &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;TeamTigers/minisauras@v2.0.0&lt;/span&gt;
  &lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;GITHUB_TOKEN&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.TOKEN }}&lt;/span&gt;
  &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;directory&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;src/'&lt;/span&gt; &lt;span class="c1"&gt;# all files under 'src' directory&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Minisauras Repository :&lt;/strong&gt;&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--A9-wwsHG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/TeamTigers"&gt;
        TeamTigers
      &lt;/a&gt; / &lt;a href="https://github.com/TeamTigers/minisauras"&gt;
        minisauras
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      An open-source CI/CD automation tool based on :octocat: GitHub Actions that pulls all the JavaScript and CSS files from your base branch, minify them and creates a pull-request with a new branch.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/TeamTigers/minisaurasassets/icons/icon.svg"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5jMJDlrW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/TeamTigers/minisaurasassets/icons/icon.svg" alt="banner"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/6c1d6a2795ad8b0f02e489a450bf4811c9e9539de35c091d9e1c893381f85e49/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7465616d7469676572732f6d696e697361757261732f6d696e697361757261733f636f6c6f723d303063383533266c6162656c436f6c6f723d323132313231266c6162656c3d6d696e69736175726173266c6f676f3d676974687562266c6f676f436f6c6f723d666666666666"&gt;&lt;img src="https://camo.githubusercontent.com/6c1d6a2795ad8b0f02e489a450bf4811c9e9539de35c091d9e1c893381f85e49/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7465616d7469676572732f6d696e697361757261732f6d696e697361757261733f636f6c6f723d303063383533266c6162656c436f6c6f723d323132313231266c6162656c3d6d696e69736175726173266c6f676f3d676974687562266c6f676f436f6c6f723d666666666666" alt="minisauras"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/2df9fc85a184ba1471f5198becb9d95f86b9b5bcfee7e9558d9c72c0d9b29c3b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f7465616d7469676572732f6d696e697361757261733f636f6c6f723d353336646665266c6f676f3d676974687562266c6162656c436f6c6f723d323132313231266c6f676f436f6c6f723d666666666666"&gt;&lt;img src="https://camo.githubusercontent.com/2df9fc85a184ba1471f5198becb9d95f86b9b5bcfee7e9558d9c72c0d9b29c3b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f7465616d7469676572732f6d696e697361757261733f636f6c6f723d353336646665266c6f676f3d676974687562266c6162656c436f6c6f723d323132313231266c6f676f436f6c6f723d666666666666" alt="star"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/765edad69ec0614f2faac807f799ddb6f7aed2f4e2cc85078ddf320c476659ae/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f7465616d7469676572732f6d696e697361757261733f636f6c6f723d336435616665266c6162656c3d6d696e69736175726173266c6162656c436f6c6f723d323132313231266c6f676f3d676974687562253230616374696f6e73266c6f676f436f6c6f723d666666666666"&gt;&lt;img src="https://camo.githubusercontent.com/765edad69ec0614f2faac807f799ddb6f7aed2f4e2cc85078ddf320c476659ae/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f7465616d7469676572732f6d696e697361757261733f636f6c6f723d336435616665266c6162656c3d6d696e69736175726173266c6162656c436f6c6f723d323132313231266c6f676f3d676974687562253230616374696f6e73266c6f676f436f6c6f723d666666666666" alt="releases"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/73ac4717b1fc3b8ecc9e9c01330a9f60cd7f7b10b51e3f922414f27d213b0493/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7465616d7469676572732f6d696e697361757261733f636f6c6f723d303063383533266c6162656c436f6c6f723d323132313231266c6f676f3d737072696e74266c6f676f436f6c6f723d666666666666"&gt;&lt;img src="https://camo.githubusercontent.com/73ac4717b1fc3b8ecc9e9c01330a9f60cd7f7b10b51e3f922414f27d213b0493/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7465616d7469676572732f6d696e697361757261733f636f6c6f723d303063383533266c6162656c436f6c6f723d323132313231266c6f676f3d737072696e74266c6f676f436f6c6f723d666666666666" alt="GitHub"&gt;&lt;/a&gt;
&lt;a href="https://dev.to/_shunjid/minisauras-a-github-action-to-minify-css-and-js-files-34b9" rel="nofollow"&gt;&lt;img src="https://camo.githubusercontent.com/a070dcc20f4711a67f2ce08214c1d403c9c9ed1640a51cb4e1085a9bc885ccdb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2532302d616374696f6e732532306861636b6174686f6e2d626c61636b3f636f6c6f723d313431373141266c6162656c436f6c6f723d336635316235266c6f676f3d6465762e746f266c6f676f436f6c6f723d666666666666" alt="Hackathon"&gt;&lt;/a&gt;
&lt;a href="https://hits.seeyoufarm.com" rel="nofollow"&gt;&lt;img src="https://camo.githubusercontent.com/7f7e713287ba6fae0a3657d8b330b352234faf7826f93d44657c161b95a3dd13/68747470733a2f2f686974732e736565796f756661726d2e636f6d2f6170692f636f756e742f696e63722f62616467652e7376673f75726c3d68747470732533412532462532466769746875622e636f6d2532467465616d7469676572732532466d696e6973617572617326636f756e745f62673d253233323132313231267469746c655f62673d2532333531326461382669636f6e3d62757a7a666565642e7376672669636f6e5f636f6c6f723d253233464646464646267469746c653d766973746974656426656467655f666c61743d66616c7365" alt="Hits"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;h1&gt;
Minisauras 🎉
&lt;/h1&gt;
&lt;p&gt;Minisauras is an open-source CI/CD automation tool based on &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oaNODbsX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.githubassets.com/images/icons/emoji/octocat.png" class="article-body-image-wrapper"&gt;&lt;img class="emoji" title=":octocat:" alt=":octocat:" src="https://res.cloudinary.com/practicaldev/image/fetch/s--oaNODbsX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.githubassets.com/images/icons/emoji/octocat.png" height="20" width="20"&gt;&lt;/a&gt; &lt;a href="https://github.com/features/actions"&gt;&lt;strong&gt;GitHub Actions&lt;/strong&gt;&lt;/a&gt; that pulls all the JavaScript and CSS files from your base branch, minify them and creates a pull-request with a new branch.&lt;/p&gt;
&lt;h2&gt;
How it works&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Traverse through a given directory (if not provided, traverse from root), finds all the JavaScript &amp;amp; CSS files within it and it's sub-directories.&lt;/li&gt;
&lt;li&gt;Afterwards, &lt;strong&gt;Minisauras&lt;/strong&gt; minify all those files.&lt;/li&gt;
&lt;li&gt;Finally, it creates a new branch in your repository, push those changes and creates a pull request that can be merged in your base branch.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
Usage&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Create a &lt;a href="https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token"&gt;personal access token&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Then &lt;a href="https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets"&gt;setup a secret&lt;/a&gt; using that personal access token in your desired repository.&lt;/li&gt;
&lt;li&gt;Create a workflow. For example: &lt;strong&gt;main.yml&lt;/strong&gt; under (.github/workflows) directory.&lt;/li&gt;
&lt;li&gt;In the workflow, provide following things
&lt;ul&gt;
&lt;li&gt;Personal access token. For example: ${{ secrets.TOKEN }} if you set your secret with a name 'TOKEN'.&lt;/li&gt;
&lt;li&gt;The desired directory in which you…&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/TeamTigers/minisauras"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h3&gt;
  
  
  &lt;strong&gt;Additional Resources / Info&lt;/strong&gt;
&lt;/h3&gt;

&lt;h4&gt;
  
  
  💡 &lt;strong&gt;Example and output&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Here is an example repository that shows the usage of GitHub Action &lt;a href="https://github.com/TeamTigers/minisauras"&gt;minisauras&lt;/a&gt;. You can see there, how minisauras has minified all the CSS &amp;amp; JS files of this repository and sent a &lt;a href="https://github.com/TeamTigers/minisauras-example/pull/6"&gt;Pull Request&lt;/a&gt; over there.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--A9-wwsHG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/TeamTigers"&gt;
        TeamTigers
      &lt;/a&gt; / &lt;a href="https://github.com/TeamTigers/minisauras-example"&gt;
        minisauras-example
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      An example repository to show how to use @TeamTigers/minisauras in a repository.
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Below is a pull request sent by &lt;strong&gt;Minisauras&lt;/strong&gt; with changes in some CSS and JavaScript files:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--L0DAuw43--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://raw.githubusercontent.com/TeamTigers/minisauras-example/master/assets/cat-making-pr.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--L0DAuw43--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://raw.githubusercontent.com/TeamTigers/minisauras-example/master/assets/cat-making-pr.gif" alt="cat-pr" width="800" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Additionally, in the GitHub Action's console you will see the &lt;a href="https://github.com/TeamTigers/minisauras-example/runs/1089529172?check_suite_focus=true"&gt;confirmation of pull request&lt;/a&gt; sent by Minisauras.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/TeamTigers/minisauras-example/runs/1089529172?check_suite_focus=true"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2LKv4It0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://i.imgur.com/sfIp5ad.png" width="800" height="428"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Our journey 🤗
&lt;/h4&gt;

&lt;p&gt;It was a fun participating in GitHub Actions Hackathon. Usually in academic projects we develop Web or Mobile applications. We've participated in so many national &amp;amp; international Hackathons too. But in &lt;strong&gt;#ActionsHackathon&lt;/strong&gt; we did something really new !!! We've faced so many challenges during the development period. Below is our 'Action Development Life Cycle' (ADLC). Obviously, this journey isn't over yet. We'll still be maintaining this project after the hackathon. So, you can submit &lt;a href="https://github.com/TeamTigers/minisauras/issues/new"&gt;issues&lt;/a&gt; for improvements and new feature requests at anytime.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7ZtjToeA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/129jqdjs4ctz8moizhsi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7ZtjToeA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/129jqdjs4ctz8moizhsi.png" alt="Timeline" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here are some really good resources that helped us building &lt;strong&gt;Minisauras&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.github.com/en/actions/creating-actions/creating-a-javascript-action"&gt;Creating a JavaScript Action&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://octokit.github.io/rest.js/"&gt;Octokit REST API Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/gr2m/octokit-plugin-create-pull-request"&gt;Octokit plugin to create a pull request&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"&gt;Promise in JavaScript&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  All 3 Contributors
&lt;/h4&gt;


&lt;div class="ltag__user ltag__user__id__"&gt;
    &lt;div class="ltag__user__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xtH13c6f--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/practicaldev/image/fetch/s--diPD5F8K--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://thepracticaldev.s3.amazonaws.com/i/99mvlsfu5tfj9m7ku25d.png" alt="[deleted user] image"&gt;
    &lt;/div&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;[Deleted User]&lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;div class="ltag__user ltag__user__id__316366"&gt;
    &lt;a href="/zubayerhimel0" class="ltag__user__link profile-image-link"&gt;
      &lt;div class="ltag__user__pic"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sWNxadyd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/practicaldev/image/fetch/s--xxy9e1gV--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://dev-to-uploads.s3.amazonaws.com/uploads/user/profile_image/316366/16b5475d-49f9-47e2-a55d-d5b58169596d.png" alt="zubayerhimel0 image"&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
&lt;a class="ltag__user__link" href="/zubayerhimel0"&gt;Zubayer Himel&lt;/a&gt;Follow
&lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a class="ltag__user__link" href="/zubayerhimel0"&gt;Software engineering student 🧍, front-end developer 💻and designer 🎨&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;div class="ltag__user ltag__user__id__440949"&gt;
    &lt;a href="/jinnatul" class="ltag__user__link profile-image-link"&gt;
      &lt;div class="ltag__user__pic"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---E9zhAwi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/practicaldev/image/fetch/s--bCaWCxux--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://dev-to-uploads.s3.amazonaws.com/uploads/user/profile_image/440949/4bebab84-6d00-4065-a123-0db04207f80e.jpg" alt="jinnatul image"&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
&lt;a class="ltag__user__link" href="/jinnatul"&gt;Md Zinnatul Islam Morol&lt;/a&gt;Follow
&lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a class="ltag__user__link" href="/jinnatul"&gt;Software Engineer ⭐ | Open Source Contributor 🔥 | Content Writer ✍&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>actionshackathon</category>
      <category>javascript</category>
      <category>github</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Firebase secrets in GitHub actions (Case Study)</title>
      <dc:creator>Shunjid Rahman Showrov</dc:creator>
      <pubDate>Tue, 04 Aug 2020 14:21:53 +0000</pubDate>
      <link>https://dev.to/shunjid/firebase-secrets-in-github-actions-case-study-4108</link>
      <guid>https://dev.to/shunjid/firebase-secrets-in-github-actions-case-study-4108</guid>
      <description>&lt;h3&gt;
  
  
  &lt;strong&gt;Make sure you've:&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Some experiences in &lt;a href="https://github.com/features/actions"&gt;flutter&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Basic understanding of Git &amp;amp; GitHub&lt;/li&gt;
&lt;li&gt;Working knowledge of &lt;a href="https://firebase.google.com/docs/flutter/setup"&gt;setting-up a flutter app with firebase&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Before starting&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Let's gather some idea about &lt;a href="https://github.com/features/actions"&gt;GitHub Actions&lt;/a&gt;. GitHub Actions is a CI/CD tool for automation to build, test &amp;amp; deploy your projects on any platform. The idea behind this scenario is you need to create some workflows &amp;amp; running it in a container or, in a virtual machine. Nowadays, &lt;a href="https://github.com/marketplace/actions/flutter-action"&gt;flutter-action&lt;/a&gt; - a third party utility is mostly used to build &amp;amp; test flutter applications on GitHub actions. &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Let's start 😎&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;You might have worked with &lt;strong&gt;google-services.json&lt;/strong&gt; during the registration of your flutter application in firebase. In most cases, developers refer it into the &lt;strong&gt;.gitignore&lt;/strong&gt; and avoid committing the google-services.json file in GitHub due to security purpose. Avoiding to commit the JSON file is also considered to be a good practice. But doing so raises some problems too. Before diving deep, let's understand the problem through a case study.&lt;/p&gt;

&lt;h4&gt;
  
  
  Case Study
&lt;/h4&gt;

&lt;p&gt;Your project manager is "Mr. X" who is very strict in terms of testing. Each branches must pass the CI/CD before merging it into the master/main branch. Your team uses &lt;strong&gt;GitHub Actions&lt;/strong&gt; &amp;amp; the workflows of your project runs all the tests whenever a pull request is created. At some point, your app needs to communicate with firebase. In this situation your project needs to deal with google-services.json both in the development environment &amp;amp; the environment of GitHub Actions to pass the tests on each pull requests. Moreover, &lt;strong&gt;you can't expose the JSON file in public.&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/U5DNSiHo21pvuJEXye/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/U5DNSiHo21pvuJEXye/giphy.gif" alt="Confused Shinchan"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Seems difficult? Let's deal with it 😎&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Solution (Step-by-Step)&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;tar archive:&lt;/strong&gt; Usually, the google-services.json is located at &lt;code&gt;android/app&lt;/code&gt; directory. Next, we will be creating a tar archive of the JSON file using these options:

&lt;ul&gt;
&lt;li&gt;c – creates a new .tar archive file&lt;/li&gt;
&lt;li&gt;v – verbosely show the .tar file progress&lt;/li&gt;
&lt;li&gt;f – file name type of the archive file&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Creating tar:&lt;/strong&gt; We will be naming the tar file as &lt;code&gt;services.tar&lt;/code&gt;. Run the command below in your project's working directory to create the archive file: 

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;tar cvf services.tar android/app/google-services.json&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;.gitignore services.tar:&lt;/strong&gt; Add the &lt;code&gt;services.tar&lt;/code&gt; file in .gitignore. Don't forget to do this !!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Encryption:&lt;/strong&gt; Before encryption, make sure you've &lt;a href="https://gnupg.org/download/"&gt;gnupg&lt;/a&gt; installed in your system. Run the command below to encrypt the services.tar file. During encryption, it will ask for password which will be used to decrypt the encrypted file. After running the command, there will be a new file in your project's working directory named &lt;code&gt;services.tar.gpg&lt;/code&gt;. The command is : 

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;gpg -c services.tar&lt;/code&gt; &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Secrets in GitHub:&lt;/strong&gt; Replace the required part with your project's repository link in the below URL &amp;amp; head over to it: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;https://&amp;lt;YOUR_GITHUB_REPOSITORY_LINK&amp;gt;/settings/secrets/new&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Or, you can find this by navigating to &lt;strong&gt;Settings &amp;gt; Secrets &amp;gt; New Secret&lt;/strong&gt; of your repository.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Create secrets:&lt;/strong&gt; There will be two parameters required to create a secret. In the first field &lt;code&gt;name&lt;/code&gt;, enter the value &lt;code&gt;FIREBASE_SECRET&lt;/code&gt; &amp;amp; in the second field &lt;code&gt;value&lt;/code&gt;, enter the password you've previously used to encrypt the tar archive file.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Workflow:&lt;/strong&gt; In your project's working directory, create a directory named as &lt;code&gt;.github&lt;/code&gt;. Inside, the .github directory, create &lt;code&gt;workflows&lt;/code&gt; directory. Then in the workflows directory, create a file &lt;code&gt;ci.yml&lt;/code&gt;. Lastly, paste the code below in ci.yml. Assuming you have a test program test/widget_test.dart. Modify the test command at the end as your needs.&lt;br&gt;&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;CI&lt;/span&gt;
&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;pull_request&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;push&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;

&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;

  &lt;span class="na"&gt;build&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;build and test&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v2&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v1&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/setup-java@v1&lt;/span&gt;
      &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;java-version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;12.x'&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;subosito/flutter-action@v1&lt;/span&gt;
      &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;channel&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;beta'&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;flutter pub get&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Build&lt;/span&gt;
      &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
        &lt;span class="s"&gt;mkdir $HOME/private&lt;/span&gt;
        &lt;span class="s"&gt;gpg --quiet --batch --yes --decrypt --passphrase="$FIREBASE_SECRET" \&lt;/span&gt;
        &lt;span class="s"&gt;--output $HOME/private/services.tar services.tar.gpg&lt;/span&gt;
        &lt;span class="s"&gt;tar xvf $HOME/private/services.tar&lt;/span&gt;
        &lt;span class="s"&gt;flutter build appbundle&lt;/span&gt;
      &lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;FIREBASE_SECRET&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.FIREBASE_SECRET }}&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Test&lt;/span&gt;
      &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;flutter test test/widget_test.dart&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Understanding the ci.yml
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;on: [pull_request, push]&lt;/code&gt;: This workflow will work whenever someone push or, make a pull request.&lt;/li&gt;
&lt;li&gt;In the &lt;code&gt;steps&lt;/code&gt; we are: 

&lt;ul&gt;
&lt;li&gt;Using required utilities.&lt;/li&gt;
&lt;li&gt;Running &lt;code&gt;flutter pub get&lt;/code&gt; command to install required packages defined in &lt;code&gt;pubspec.yaml&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Decrypting the &lt;code&gt;services.tar.gpg&lt;/code&gt; by using the password we have stored in the secrets &lt;code&gt;FIREBASE_SECRET&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Building &amp;amp; running the tests of our application on GitHub actions.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;References:&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://medium.com/flutter-community/automating-flutter-publishing-with-github-actions-firebase-app-distribution-cc80dec638de"&gt;Automation article by flutter community&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://stackoverflow.com/questions/34251441/commiting-google-services-json-to-github/42868893"&gt;Stackoverflow solution by Bertrand Martel&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Last but not the least
&lt;/h4&gt;

&lt;p&gt;To err is human. If you find any mistakes here or, any sentence/word/code-snippet which can be corrected or, improved then feel free to knock me on &lt;a href="https://twitter.com/_shunjid"&gt;Twitter&lt;/a&gt;. If you find this helpful then share it to help others too.&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>firebase</category>
      <category>devops</category>
      <category>github</category>
    </item>
  </channel>
</rss>
