Automating Releases with GitHub Actions

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello in this video we'll look at adding automated releases to a github repository so that we can create github releases whenever we tag a commit and push that commit to github very quickly we can see this visually and then understand it in the code so imagine we start with the repository where we're building and deploying on every commit so locally in our ide we're developing committing and then pushing those commits to github we still want that and we still want the automated deployment system but really we want to add one other github actions workflow where we're automatically creating github releases so users can see our new releases and they see what they contain now this will be a separate workflow from the build and deploy github actions workflow so we'll be creating a separate github actions workflow and will use a public repository that's in the description of this video which you can reference so this is the repository here in this case for a web application we have one github actions workflow in the github directory the workflows directory within that and then there's a configuration file for the actions workflow now this is going to deploy on every commit we want to add a new file here and we'll call this release.yaml now we want to release whenever we have a commit tag which starts with v for a version so this is the code we need for our github actions workflow here we have the name of the workflow we have the trigger and we're going to run on every commit tag which begins with v and finally we have the job when we run this it will create a github release it has the commit involved in that release it will detail each commit that was a part of the release and that will be since the last version tag so let's add this to our repository and let's then push that now if we open the workflow summary here we see that just our commit workflow is running just the workflow that runs on every commit to build and deploy not this release workflow and the reason for that is we need to tag the commit and now if we open we see the release workflow is now running this is running from the v010 tag there are only three steps to the workflow that just ran and we'll talk about those in detail but first let's see the result we see that a version 0.1.0 was created now to see how it automatically creates a list of commits we need to have a new version so it can compare versus the last application and tell us what the new commits are so we'll create a simple commit in this web application and again create a tag and push it now when we go to the github repository we'll see a new release running for a 0 1 1 version and we'll see the new release note that it has a list of commits including the update webpage title and the name of the committer that contributed that commit so you'll get a list of commits that were involved in this release that is the commit since the last version you should hopefully have that working and we can understand the workflow now by looking at the steps involved what we're going to do is first run on ubuntu then use this plugin that's available in github actions which automatically creates releases all we need for that is to supply a repository token and this secret is automatically added to the github actions workflow we do not need to specify this secret it's running on github and so that will be automatically provided when this workflow runs so with this simple 19 lines of configuration we can have these automated releases that create automatic github releases and automatic list of commits that are a part of that release this will help our users understand what we're releasing with different versions and keep everyone up to date with who's contributing what into various releases this repository is publicly available so if you'd like to experiment with these concepts you can clone copy or fork the repository and try this out
Info
Channel: Nodematic
Views: 522
Rating: undefined out of 5
Keywords:
Id: -0vWW-ymlfw
Channel Id: undefined
Length: 6min 56sec (416 seconds)
Published: Wed Jun 23 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.