newpipe-documentation/07_release_instructions/index.html

543 lines
31 KiB
HTML

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="shortcut icon" href="../img/favicon.ico" />
<title>Release instructions for normal releases - NewPipe Development Documentation</title>
<!-- local fonts -->
<link rel="stylesheet" href="../css/local_fonts.css" type="text/css" />
<link rel="stylesheet" href="../css/theme.css" type="text/css" />
<link rel="stylesheet" href="../css/theme_extra.css" type="text/css" />
<link rel="stylesheet" href="../css/theme_child.css" type="text/css" />
<!-- local code syntax highlighting -->
<link rel="stylesheet" href="../css/github.min.css" type="text/css" />
<link rel="stylesheet" href="../css/highlight.css" type="text/css" />
<script>
// Current page data
var mkdocs_page_name = "Release instructions for normal releases";
var mkdocs_page_input_path = "07_release_instructions.md";
var mkdocs_page_url = null;
</script>
<script src="../js/jquery-2.1.1.min.js" defer></script>
<script src="../js/modernizr-2.8.3.min.js" defer></script>
<script src="../js/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href=".." class="icon icon-home"> NewPipe Development Documentation
</a><div role="search">
<form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" title="Type search term here" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="..">Welcome to the NewPipe Development Docs</a>
</li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../00_Prepare_everything/">Before You Start</a>
</li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../01_Concept_of_the_extractor/">Concept of the Extractor</a>
</li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../02_Concept_of_LinkHandler/">Concept of the LinkHandler</a>
</li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../03_Implement_a_service/">Implementing a Service</a>
</li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../04_Run_changes_in_App/">Testing Your Changes in the App</a>
</li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../05_Mock_tests/">Mock Tests</a>
</li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../06_releasing/">Releasing a New NewPipe Version</a>
</li>
</ul>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal current" href="./">Release instructions for normal releases</a>
<ul class="current">
<li class="toctree-l2"><a class="reference internal" href="#preliminary-steps">Preliminary steps</a>
<ul>
<li class="toctree-l3"><a class="reference internal" href="#permissions">Permissions</a>
</li>
<li class="toctree-l3"><a class="reference internal" href="#repositories">Repositories</a>
</li>
<li class="toctree-l3"><a class="reference internal" href="#version-name-and-conventions">Version name and conventions</a>
</li>
<li class="toctree-l3"><a class="reference internal" href="#identification">Identification</a>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#pull-changes-from-weblate">Pull changes from Weblate</a>
</li>
<li class="toctree-l2"><a class="reference internal" href="#create-a-changelog">Create a changelog</a>
</li>
<li class="toctree-l2"><a class="reference internal" href="#push-the-changelog-to-weblate">Push the changelog to Weblate</a>
</li>
<li class="toctree-l2"><a class="reference internal" href="#creating-the-release-branch">Creating the release branch</a>
</li>
<li class="toctree-l2"><a class="reference internal" href="#creating-the-pull-request">Creating the Pull Request</a>
</li>
<li class="toctree-l2"><a class="reference internal" href="#creating-the-issue">Creating the issue</a>
</li>
<li class="toctree-l2"><a class="reference internal" href="#testing-apks">Testing APKs</a>
</li>
<li class="toctree-l2"><a class="reference internal" href="#taking-care-of-regressions-quickfixes">Taking care of regressions (quickfixes)</a>
</li>
<li class="toctree-l2"><a class="reference internal" href="#finally-merging-the-pull-request">Finally merging the pull request</a>
</li>
<li class="toctree-l2"><a class="reference internal" href="#creating-the-apk">Creating the APK</a>
</li>
<li class="toctree-l2"><a class="reference internal" href="#having-the-apk-signed-by-theassassin">Having the APK signed by @TheAssassin</a>
</li>
<li class="toctree-l2"><a class="reference internal" href="#publishing-the-release">Publishing the release</a>
</li>
<li class="toctree-l2"><a class="reference internal" href="#blog-post">Blog post</a>
</li>
</ul>
</li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../08_documentation/">About This Documentation</a>
</li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../09_maintainers_view/">Maintainers' Section</a>
</li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="Mobile navigation menu">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="..">NewPipe Development Documentation</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content"><div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href=".." class="icon icon-home" aria-label="Docs"></a> &raquo;</li>
<li class="breadcrumb-item active">Release instructions for normal releases</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div class="section" itemprop="articleBody">
<h1 id="release-instructions-for-normal-releases">Release instructions for normal releases</h1>
<p>This page contains detailed instructions for normal releases. Refer to <a href="../06_releasing">Releasing a New NewPipe Version</a> for other information about releases.</p>
<h2 id="preliminary-steps">Preliminary steps</h2>
<h3 id="permissions">Permissions</h3>
<ul>
<li>Have admin rights on Weblate<ul>
<li>You should be able to access <a href="https://hosted.weblate.org/projects/newpipe/#repository">Weblate's Maintenance page</a></li>
<li>Tip: if the correct page does not show up when clicking that URL, make sure you are logged in ;-)</li>
</ul>
</li>
<li>Have at least maintainer rights on the NewPipe and NewPipeExtractor repos</li>
</ul>
<h3 id="repositories">Repositories</h3>
<ul>
<li>Have a cloned NewPipe local repository (for the rest of the page, <code>origin</code> is assumed to be the remote at <code>github.com/TeamNewPipe/NewPipe</code>)</li>
<li>Add the <code>weblate</code> remote to the same local repository (the URL used below can be found on the Maintenance page on Weblate)<ul>
<li><code>git remote add weblate https://hosted.weblate.org/git/newpipe/strings/</code></li>
</ul>
</li>
<li>Make sure there are no pending changes<ul>
<li><code>git clean -fdx</code> to <strong>discard</strong> them all (<strong>CAUTION</strong>)</li>
</ul>
</li>
<li>Switch to the <code>dev</code> branch and make sure it is up-to-date with the remote:<ul>
<li><code>git checkout dev</code></li>
<li><code>git pull origin dev</code></li>
</ul>
</li>
</ul>
<h3 id="version-name-and-conventions">Version name and conventions</h3>
<ul>
<li>Find the version code of the next release by looking for <code>versionCode</code> in <a href="https://github.com/TeamNewPipe/NewPipe/blob/dev/app/build.gradle"><code>app/build.gradle</code></a>: You will add 1 to that value (from now on called <code>NEW_VERSION_CODE</code>) to get the new value (but do not edit the file yet)</li>
<li>Choose the version number of the next release according to <a href="https://semver.org/">semantic versioning</a> (from now on called <code>X.X.X</code>)</li>
</ul>
<h3 id="identification">Identification</h3>
<ul>
<li>Have <code>gpg</code> installed and usable on your PC</li>
<li>Have a GPG key, which can be used to verify that a file is really from you</li>
</ul>
<h2 id="pull-changes-from-weblate">Pull changes from Weblate</h2>
<ul>
<li>Go to <a href="https://hosted.weblate.org/projects/newpipe/#repository">Weblate's Maintenance tab</a></li>
<li>Press the <em>Lock</em> button to prevent translators from translating while you are creating commits; remember to <em>Unlock</em> later!</li>
<li>Press the <em>Update</em> button to update Weblate with the latest changes on NewPipe's <code>dev</code> branch</li>
<li>Press the <em>Commit</em> button, if needed, to make sure Weblate creates a commit for translations which have not been committed yet</li>
<li>Now go back to the local git repository</li>
<li>In case you followed these steps before, delete the <code>weblate-dev</code> branch<ul>
<li><code>git branch -D weblate-dev</code></li>
</ul>
</li>
<li>Fetch new changes from the <code>weblate</code> remote<ul>
<li><code>git fetch weblate</code></li>
</ul>
</li>
<li>Create a new branch starting from <code>weblate/dev</code>, named <code>weblate-dev</code>, and switch to it<ul>
<li><code>git checkout -b weblate-dev weblate/dev</code></li>
</ul>
</li>
<li>If you run <code>git log --oneline --graph</code> you should see a Weblate commit on top, and then all of the commits currently on the <code>dev</code> branch:</li>
</ul>
<pre><code class="language-md">* cmt12hash (HEAD -&gt; weblate-dev, weblate/dev) Translated using Weblate (...)
* cmt89hash (origin/dev, dev) Commit message ...
</code></pre>
<ul>
<li>Switch back to the <code>dev</code> branch<ul>
<li><code>git checkout dev</code></li>
</ul>
</li>
<li>Merge <code>weblate-dev</code> into <code>dev</code>:<ul>
<li><code>git merge weblate-dev</code></li>
</ul>
</li>
</ul>
<h2 id="create-a-changelog">Create a changelog</h2>
<ul>
<li>Finalize the draft changelog <a href="https://github.com/TeamNewPipe/NewPipe/releases">kept on GitHub</a>, in case there are still some things to fill in<ul>
<li>Remove the temporary instructions, and the numbers before <code>-</code> which keep track of the order in which the PRs were merged, as that info is useful only for the blog post writers</li>
<li>Before removing that information, you may want to send the original changelog to the blogpost writers</li>
</ul>
</li>
<li>Create a new English changelog in the <a href="https://github.com/TeamNewPipe/NewPipe/blob/dev/fastlane/metadata/android/en-US/changelogs/"><code>fastlane/metadata/android/en-US/changelogs/</code></a> folder</li>
<li>The file should be named <code>NEW_VERSION_CODE.txt</code>, using the new version code found in the <a href="#preliminary-steps">Preliminary steps</a></li>
<li>The file should have this structure (sections with no points can be removed):</li>
</ul>
<pre><code class="language-txt">New
• ...
Improved
• ...
Fixed
• ...
</code></pre>
<ul>
<li>Make sure you use the <code></code> for points (it looks nicer than <code>-</code>)</li>
<li>Capitalize the first letter in each point</li>
<li>Use English verbs as if you were asking someone to do something, so for example use "Fix abc" and not "Fixed abc"; this allows saving a few characters and using a consistent style</li>
<li>Prepend <code>[SERVICE]</code> to service-only changes (e.g. "• [YouTube] Add mixes")</li>
<li>Summarize only the most important changes from the draft release <a href="https://github.com/TeamNewPipe/NewPipe/releases">kept on GitHub</a> (it contains all merged pull requests)</li>
<li>Make sure the file size is <strong>at most 500 bytes</strong>, in order to <strong>fit <a href="https://f-droid.org/en/docs/All_About_Descriptions_Graphics_and_Screenshots/#fastlane-structure">F-Droid's changelog size limit</a> (!)</strong><ul>
<li>Tip: removing the newline at the end of the file saves 1 byte ;-)</li>
</ul>
</li>
<li>Commit the file on the <code>dev</code> branch (try to stick to the provided commit message template)<ul>
<li><code>git add fastlane/metadata/android/en-US/changelogs/NEW_VERSION_CODE.txt</code></li>
<li><code>git commit -m "Add changelog for vX.X.X (NEW_VERSION_CODE)"</code></li>
</ul>
</li>
</ul>
<h2 id="push-the-changelog-to-weblate">Push the changelog to Weblate</h2>
<p>Now there should be two new commits (the Weblate and changelog ones) on your local <code>dev</code> branch, which are not on NewPipe's remote <code>dev</code> branch.</p>
<ul>
<li>If you are an admin of the NewPipe repo, just push the changes to the remote <code>dev</code><ul>
<li><code>git push origin dev</code></li>
<li>If you are not an admin, create a pull request normally and ask someone with maintainer access to merge it</li>
</ul>
</li>
<li>Go to <a href="https://hosted.weblate.org/projects/newpipe/#repository">Weblate's Maintenance tab</a></li>
<li>Press the <em>Update</em> button to update Weblate with the commit you just pushed on NewPipe's <code>dev</code> branch</li>
<li><strong>Press the <em>Unlock</em></strong> button to allow translators to translate the changelog and possibly other components (<strong>do not forget this step!</strong>)</li>
<li>Note that we had to do this process on NewPipe's <code>dev</code> branch because:<ul>
<li>Weblate's components are connected to NewPipe's <code>dev</code> branch, and will update changes from there</li>
<li>Weblate's git repo is not writable, so there is no way to push commits there manually</li>
</ul>
</li>
</ul>
<h2 id="creating-the-release-branch">Creating the release branch</h2>
<ul>
<li>Create a new branch starting from <code>dev</code>, named <code>release-X.X.X</code>, and switch to it<ul>
<li><code>git checkout dev</code></li>
<li><code>git checkout -b release-X.X.X</code></li>
</ul>
</li>
<li>Edit the <a href="https://github.com/TeamNewPipe/NewPipe/blob/dev/app/build.gradle"><code>app/build.gradle</code></a> file to update the extractor<ul>
<li>Set the NewPipeExtractor dependency version to a suitable one (usually <a href="https://github.com/TeamNewPipe/NewPipeExtractor/commits/dev">the last commit in the NewPipeExtractor repo</a>)</li>
</ul>
</li>
<li>Commit the extractor update (if you used a specific version, append <code>to VERSION</code> to the commit message)<ul>
<li><code>git add app/build.gradle</code></li>
<li><code>git commit -m "Update NewPipeExtractor"</code></li>
</ul>
</li>
<li>Edit the <a href="https://github.com/TeamNewPipe/NewPipe/blob/dev/app/build.gradle"><code>app/build.gradle</code></a> file to bump the release<ul>
<li>Set <code>versionCode</code> to <code>NEW_VERSION_CODE</code>, i.e. increment the value by 1 as described in the <a href="#preliminary-steps">Preliminary steps</a></li>
<li>Set <code>versionName</code> to <code>"X.X.X"</code></li>
</ul>
</li>
<li>Commit the version bump (try to stick to the provided commit message template)<ul>
<li><code>git add app/build.gradle</code></li>
<li><code>git commit -m "Release vX.X.X (NEW_VERSION_CODE)"</code></li>
</ul>
</li>
<li>Push the newly created branch to the NewPipe repo<ul>
<li><code>git push origin release-X.X.X</code></li>
</ul>
</li>
</ul>
<h2 id="creating-the-pull-request">Creating the Pull Request</h2>
<ul>
<li>Create a Pull Request (PR) from the new branch you just pushed<ul>
<li>If you used the correct branch name you should be able to use this URL, after changing the X.X.X: <code>https://github.com/TeamNewPipe/NewPipe/pull/new/release-X.X.X</code></li>
</ul>
</li>
<li>Make sure the PR has <code>master</code> as the <em>base</em> branch and <code>release-X.X.X</code> as the <em>compare</em> branch</li>
<li>The PR title should be "Release vX.X.X (NEW_VERSION_CODE)"</li>
<li>Remove the entire PR template, and instead put these two lines in the description (the <code>ISSUE_NUMBER</code> will be replaced later):</li>
</ul>
<pre><code class="language-md">Do **not** report regressions here, but rather in the corresponding issue: #ISSUE_NUMBER
The changelog is also there.
</code></pre>
<ul>
<li>Once you have created the PR, note down its number (from now on called <code>PR_NUMBER</code>)</li>
<li>In case some issue would be fixed when the release PR is merged, link them using the "Development" tab on the right, or add a "Fixes #...." in the PR description</li>
<li><em>Check out <a href="https://github.com/TeamNewPipe/NewPipe/pull/8231">#8231</a> for reference</em></li>
</ul>
<h2 id="creating-the-issue">Creating the issue</h2>
<ul>
<li>Create an issue<ul>
<li>Click <a href="https://github.com/TeamNewPipe/NewPipe/issues/new">here</a> to open one without a template</li>
</ul>
</li>
<li>The issue title should be "Release vX.X.X (please TEST!)"</li>
<li>The issue should have some sections, in the same order as provided below, with <code>##</code> before titles</li>
<li>The <code>## Testing for regressions</code> section should contain the following lines; more information about how to obtain the APK are given at <a href="#testing-apks">Testing APKs</a></li>
</ul>
<pre><code class="language-md">Debug APK (built by our CI in #PR_NUMBER): ...
Please report **only regressions** (i.e. new issues) here, not issues that were already present in previous releases!
</code></pre>
<ul>
<li>An optional <code>## TODO</code> section should contain a list of things that still need to be done before releasing, for example regressions that need to be fixed, or a reminder to merge the Weblate changelogs before releasing (use <code>- [ ]</code> to create checkbox lists)</li>
<li>The <code>## NewPipeExtractor version</code> section should contain a link to the NewPipeExtractor release this new NewPipe version will ship with (i.e. the one set in <a href="#creating-the-release-branch">Creating the release branch</a>); choose one of these lines as a template</li>
</ul>
<pre><code class="language-md">This version of NewPipe will ship with [NewPipeExtractor version NPE_VERSION](https://github.com/TeamNewPipe/NewPipeExtractor/releases/tag/NPE_VERSION)
This version of NewPipe will ship with [NewPipeExtractor commit FIRST_7_DIGITS_OF_NPE_COMMIT](https://github.com/TeamNewPipe/NewPipeExtractor/commit/NPE_COMMIT)
</code></pre>
<ul>
<li>Create the <code>App changelog</code> section using the template below. Copy the draft Markdown changelog <a href="https://github.com/TeamNewPipe/NewPipe/releases">kept on GitHub</a> (you finalized it earlier in <a href="#create-a-changelog">Create a changelog</a>) to the clipboard and paste it where specified below (make sure to leave a newline above, otherwise Markdown breaks):</li>
</ul>
<pre><code class="language-md">&lt;details&gt;&lt;summary&gt;&lt;h2&gt;App changelog &lt;/h2&gt;&lt;/summary&gt;&lt;p&gt;
INSERT_COPIED_CHANGELOG_HERE
&lt;/details&gt;
</code></pre>
<ul>
<li>Once you have created the issue, pin it using the "Pin issue" button on the right</li>
<li>Update the <code>ISSUE_NUMBER</code> in the pull request description</li>
<li><em>Check out <a href="https://github.com/TeamNewPipe/NewPipe/issues/8230">#8230</a> for reference</em></li>
</ul>
<h2 id="testing-apks">Testing APKs</h2>
<p>The first time you open the release issue, and then each time some changes are made to the release PR, you should provide a debug APK in the <code>## Testing for regressions</code> section.</p>
<ul>
<li>Wait for the Continuous Integration (CI) to finish testing the PR, then download the resulting debug APK artifact from the "Checks" tab</li>
<li>Rename it to <code>NewPipe_vX.X.X_RC1_debug.apk</code> where <code>RC1</code> should be incremented to <code>RC2</code> and so on each time a new APK is provided</li>
<li>Zip it and make sure the <code>.zip</code> file has the same name as the <code>.apk</code> it contains</li>
<li>Upload it in the issue description, replacing the <code>...</code> placeholder used above</li>
</ul>
<p>Sometimes it might be needed to also provide a release APK. In this case follow the same steps as above, with these differences:</p>
<ul>
<li>Make sure you are on the <code>release-X.X.X</code> branch</li>
<li>Build the <strong>release</strong> APK yourself in Android Studio and sign it with your keys<ul>
<li><em>Temporarily</em> edit the <code>app/build.gradle</code> file and add <code>System.properties.put("packageSuffix", "vX_X_X")</code> at the top of the <code>android -&gt; buildTypes -&gt; release</code> block, which ensures that the application has a different package name than the official one</li>
<li>Build and sign an APK via "Build -&gt; Generate Signed Bundle / APK..."</li>
</ul>
</li>
<li>Make sure it installs correctly on your device</li>
<li>Use this naming scheme: <code>NewPipe_vX.X.X_RC1_release.apk</code></li>
<li>Add a line to the <code>## Testing for regressions</code> section, of this form: <code>Release APK (built and signed by @YOUR_GITHUB_USERNAME): ...</code></li>
</ul>
<h2 id="taking-care-of-regressions-quickfixes">Taking care of regressions (quickfixes)</h2>
<p>The release issue and pull request should stay open for <strong>roughly one week</strong>, so that people can test the provided APKs and give feedback. If a <em>regression</em> is reported by some user, it should possibly be solved before releasing, otherwise the app would become more broken after each release. A <em>regression</em> is a bug now present in some code that used to run well in the last release, but was then modified in this release (supposedly to fix something else) and is now broken. So the following do not classify as regressions: some videos stop working because YouTube made some changes; the newly introduced big feature XYZ is still not perfect and has some bugs; a random crash reproducible also on previous versions... You get the point. Before releasing, try to fix any regressions that are reported, but avoid fixing non-regressions, since those should be treated with the same care and attention as all other issues. As a Release Manager, you might be required to fix regressions, so plan your release at a time when you are available.</p>
<p>Pull requests fixing regressions should target the <code>release-X.X.X</code> branch, not the <code>dev</code> branch! When merging those PRs, also provide a new Release Candidate APK.</p>
<h2 id="finally-merging-the-pull-request">Finally merging the pull request</h2>
<p>Once enough time has passed and all regressions and TODOs have been solved, you can proceed with the actual release. The following points include merging weblate changes again.</p>
<ul>
<li>In the local repository, check out the release branch and make sure it is up-to-date with the remote<ul>
<li><code>git checkout release-X.X.X</code></li>
<li><code>git pull origin release-X.X.X</code></li>
</ul>
</li>
<li>Go to <a href="https://hosted.weblate.org/projects/newpipe/#repository">Weblate's Maintenance tab</a></li>
<li>Press <em>Lock</em>; remember to <em>Unlock</em> later!</li>
<li>Press <em>Update</em></li>
<li>Press <em>Commit</em>, if needed</li>
<li>Now go back to the local git repository</li>
<li>Delete the <code>weblate-dev</code> branch, just in case<ul>
<li><code>git branch -D weblate-dev</code></li>
</ul>
</li>
<li>Fetch changes from Weblate (in particular you should see the <code>weblate/dev</code> remote branch being updated)<ul>
<li><code>git fetch weblate</code></li>
</ul>
</li>
<li>Obtain the hash of the last commit on the <code>weblate/dev</code> remote branch<ul>
<li><code>git log -n 1 --pretty="format:%H" weblate/dev</code></li>
</ul>
</li>
<li>Cherry pick the hash you obtained above into the release branch (the one you are currently on)<ul>
<li><code>git cherry-pick HASH</code></li>
</ul>
</li>
<li>Push the changes to the remote branch<ul>
<li><code>git push origin release-X.X.X</code></li>
</ul>
</li>
<li>Merge the PR you created before</li>
<li>Delete the GitHub remote branch associated with the PR, i.e. <code>release-X.X.X</code> (there should be a button in the PR)</li>
<li>Close the issue you created before</li>
<li>Merge <code>dev</code> back into <code>master</code> (since the PR merged changes onto <code>master</code>)<ul>
<li><code>git checkout master</code></li>
<li><code>git pull origin master</code></li>
<li><code>git checkout dev</code></li>
<li><code>git pull origin dev</code></li>
<li><code>git merge master</code></li>
<li><code>git push origin dev</code> or create another temporary PR and merge it immediately</li>
</ul>
</li>
<li>Go to <a href="https://hosted.weblate.org/projects/newpipe/#repository">Weblate's Maintenance tab</a></li>
<li><strong>Press <em>Unlock</em></strong></li>
</ul>
<h2 id="creating-the-apk">Creating the APK</h2>
<p>Now on the remote <code>master</code> branch there is the release code which you need to turn into an APK.</p>
<ul>
<li>In the local repository, check out the <code>master</code> branch and make sure it is up-to-date with the remote<ul>
<li><code>git checkout master</code></li>
<li><code>git pull origin master</code></li>
</ul>
</li>
<li>Open the local project in Android Studio</li>
<li>Run the Gradle <code>clean</code> task using Android Studio's interface, in order to clean up temporary/cache files that may interfere with reproducible builds<ul>
<li>Double press Ctrl, type <code>gradle clean</code>, press Enter</li>
</ul>
</li>
<li>Make sure leftover files from building RC releases are actually removed, in order to avoid confusion<ul>
<li><code>rm -rf ./app/release</code></li>
</ul>
</li>
<li>Run the Gradle <code>assembleRelease</code> task using Android Studio's interface: it will start the process of building an unsigned APK<ul>
<li>Double press Ctrl, type <code>gradle assembleRelease</code>, press Enter</li>
</ul>
</li>
<li>After a while you should find the APK under <code>./app/build/outputs/apk/release/app-release-unsigned.apk</code></li>
</ul>
<h2 id="having-the-apk-signed-by-theassassin">Having the APK signed by @TheAssassin</h2>
<p>Currently @TheAssassin is the only holder of NewPipe's APK signing keys. Therefore you should send the unsigned APK to him, after which he will sign it and send it back to you. He will also then publish the signed APK in NewPipe's F-Droid repo.</p>
<ul>
<li>Rename <code>app-release-unsigned.apk</code> to <code>NewPipe_vX.X.X.apk</code></li>
<li>Generate a signature for the APK file<ul>
<li><code>gpg -b NewPipe_vX.X.X.apk</code> will generate <code>NewPipe_vX.X.X.apk.sig</code></li>
<li>It will also output 'using "FINGERPRINT" as default secret key for signing'; keep track of the <code>FINGERPRINT</code> part</li>
</ul>
</li>
<li>Send an email to @TheAssassin and attach both <code>NewPipe_vX.X.X.apk</code> and <code>NewPipe_vX.X.X.apk.sig</code></li>
<li>If @TheAssassin does not already know it, send him your PGP key <code>FINGERPRINT</code> you obtained before<ul>
<li>You should not send it using email this time, but using another service through which @TheAssassin can be almost sure it is really you (this is a sort of 2FA)</li>
<li>For example, you can send it on the IRC group, or create a GitHub gist with the fingerprint and then give that link to @TheAssassin</li>
</ul>
</li>
<li>Notify him on IRC that you have sent him an email</li>
<li>He will send you back the signed APK</li>
<li>Make sure its name is still <code>NewPipe_vX.X.X.apk</code> (rename if it's not the case)</li>
<li>Install it on your device to see if everything went well (note that installation will work only if your currently installed version of newpipe comes from NewPipe's F-Droid repo or GitHub)</li>
<li>Tell @TheAssassin to "push the buttons", i.e. publish the signed APK in NewPipe's F-Droid repo.</li>
</ul>
<h2 id="publishing-the-release">Publishing the release</h2>
<ul>
<li>Go to the draft changelog <a href="https://github.com/TeamNewPipe/NewPipe/releases">kept on GitHub</a></li>
<li>Set <code>vX.X.X</code> as the tag name</li>
<li>Set <code>vX.X.X</code> as the release title</li>
<li>Set <code>master</code> as the "Target:" branch</li>
<li>Attach the signed APK @TheAssassin sent you</li>
<li>Publish the release</li>
<li>Profit :-D</li>
</ul>
<h2 id="blog-post">Blog post</h2>
<p>The blog post writers need an up-to-date list of merged PRs numbered in chronological order. This is so that they can keep track of what changes have already been detailed in the draft blog post, and which ones still need to be added. So make sure that there is always at least one up-to-date "master copy" of the draft release notes available for them to review.</p>
<p>The blog post should ideally be published before the GitHub release is made (so that the link to it works!), but in case of some delay, it is fine to let the blog post come later. It is far more important to get the release into users' hands sooner.</p>
<ul>
<li>In order for the blog post to be published, ask @TheAssassin to "press the buttons" again</li>
<li>Once the blog post is ready, add this block of text on top of the release notes on GitHub:
<code>[:arrow_right: :arrow_right: :arrow_right: Read the blog post :arrow_left: :arrow_left: :arrow_left:](LINK_TO_BLOG_POST)</code></li>
</ul>
</div>
</div><footer>
<div class="rst-footer-buttons" role="navigation" aria-label="Footer Navigation">
<a href="../06_releasing/" class="btn btn-neutral float-left" title="Releasing a New NewPipe Version"><span class="icon icon-circle-arrow-left"></span> Previous</a>
<a href="../08_documentation/" class="btn btn-neutral float-right" title="About This Documentation">Next <span class="icon icon-circle-arrow-right"></span></a>
</div>
<hr/>
<div role="contentinfo">
<!-- Copyright etc -->
</div>
Built with <a href="https://www.mkdocs.org/">MkDocs</a> using a <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<div class="rst-versions" role="note" aria-label="Versions">
<span class="rst-current-version" data-toggle="rst-current-version">
<span><a href="../06_releasing/" style="color: #fcfcfc">&laquo; Previous</a></span>
<span><a href="../08_documentation/" style="color: #fcfcfc">Next &raquo;</a></span>
</span>
</div>
<script src="../js/jquery-3.6.0.min.js"></script>
<script>var base_url = "..";</script>
<script src="../js/theme_extra.js"></script>
<script src="../js/theme.js"></script>
<script src="../search/main.js"></script>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>