zigford.org/making-a-release-on-github.html
2020-07-21 06:49:32 +10:00

72 lines
2.8 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="main.css" type="text/css" />
<link rel="stylesheet" href="blog.css" type="text/css" />
<link rel="alternate" type="application/rss+xml" title="Subscribe to this page..." href="feed.rss" />
<title>Making a release on GitHub</title>
</head><body>
<div id="divbodyholder">
<div class="headerholder"><div class="header">
<div id="title">
<h1 class="nomargin"><a class="ablack" href="http://zigford.org/index.html">zigford.org</a></h1>
<div id="description"><a href="about.html">About</a><a href="links.html"> | Links</a><a href="scripts.html"> | Scripts</a><br>Sharing linux/windows scripts and tips</br></div>
</div></div></div>
<div id="divbody"><div class="content">
<!-- entry begin -->
<h3><a class="ablack" href="making-a-release-on-github.html">
Making a release on GitHub
</a></h3>
<!-- bashblog_timestamp: #201908202318.04# -->
<div class="subtitle">August 20, 2019 &mdash;
Jesse Harris
</div>
<!-- text begin -->
<p>Today's journey is using <code>git</code> and <code>github</code> to <em>release</em> <strong>PwshBlog</strong>
The following are my notes on the matter.</p>
<hr />
<h2 id="making-an-archive">Making an archive</h2>
<p>Normally when you make a release, you want to make an archive of the release
available for people to download. You could use git's built-in tags feature
alone, but that will include other bits of your repository that you probably
don't want to include.</p>
<p>Enter <code>git archive</code></p>
<p>The following are steps to creating the archive</p>
<ol>
<li><p>Create a <code>.gitattributes</code> file</p>
</li>
<li><p>Add lines like the following</p>
<pre><code> .gitignore export-ignore
appveyor.yml export-ignore
</code></pre>
</li>
<li><p>Add and commit the <code>.gitattributes</code> file for it to work</p>
</li>
<li><p>Create a tag</p>
<pre><code> git tag -a v0.9.0
</code></pre>
</li>
<li><p>Now create the archive</p>
<pre><code> git archive --format=zip --prefix=PwshBlog/ v0.9.0 -o v0.9.0.zip
</code></pre>
</li>
<li><p>Go create your release on github and drag in the created archive!</p>
</li>
</ol>
<p>Tags: <a href='tag_git.html'>git</a>, <a href='tag_pwshblog.html'>pwshblog</a>, <a href='tag_github.html'>github</a></p>
<!-- text end -->
<!-- entry end -->
</div>
<div id="footer">&copy <a href="http://twitter.com/zigford_org">Jesse Harris</a> &mdash; <a href="mailto:jesse&#64;zigford&#46;org">jesse&#64;zigford&#46;org</a><br/>
Generated with <a href="https://github.com/cfenollosa/bashblog">bashblog</a>, a single bash script to easily create blogs like this one</div>
</div></div>
</body></html>