Skip to content

Commit 7d78af8

Browse files
moneymanolisk9ert
andauthored
Docs: Release guide (#1930)
* first version of release guide * fix image links * images resized * more resizing * kick resize * Apply suggestions from code review Co-authored-by: k9ert <[email protected]> * docker as prerequisite, correct headlines Co-authored-by: k9ert <[email protected]>
1 parent bd8102a commit 7d78af8

File tree

7 files changed

+128
-0
lines changed

7 files changed

+128
-0
lines changed
174 KB
Loading
158 KB
Loading
79.4 KB
Loading
448 KB
Loading
64.1 KB
Loading
155 KB
Loading

docs/release-guide.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Release Guide
2+
3+
## Creating release notes
4+
### Pre-requisites
5+
- You need the correct upstream master. You should see
6+
```bash
7+
git remote -v | grep upstream
8+
upstream [email protected]:cryptoadvance/specter-desktop.git (fetch)
9+
upstream [email protected]:cryptoadvance/specter-desktop.git (push)
10+
- You need a GitHub token:
11+
If you don't have one, get one here https://github.com/settings/tokens and make sure to tick the boxes for repo and workflow as below:
12+
13+
![](./images/release-guide/github-token.png)
14+
15+
Using the new token, run
16+
```bash
17+
export GH_TOKEN=YOURTOKEN
18+
```
19+
- You need Docker running
20+
- Checkout the master branch and ensure a clean workspace.
21+
22+
Now, you can run
23+
```bash
24+
./utils/release.sh --release-notes
25+
```
26+
Or, if you want to directly set the new version:
27+
```bash
28+
./utils/release.sh --new-version v1.13.1 --release-notes
29+
```
30+
## Creating a new tag
31+
Update your master branch after the release notes PR ([example](http:/https://github.com/cryptoadvance/specter-desktop/commit/65ff6959d7fd85cba745e4d454b30031839f857f/)) has been merged and then run:
32+
```bash
33+
git tag v1.13.1 && git push upstream v1.13.1
34+
```
35+
## GitLab - releasing stage
36+
Creating a tag triggers the release process of the GitLab runners.
37+
There exists a mirror of the GitHub repo on GitLab, but only when a tag is created on GitHub will the release part of the runners execute. You can check the status here:
38+
https://gitlab.com/cryptoadvance/specter-desktop/-/pipelines
39+
40+
There are three stages:
41+
![](./images/release-guide/overview-gitlab-pipline.png)
42+
43+
The first relevant stage is "releasing". Here, the Windows, Linux and pip release are created and uploaded to the Specter Desktop GitHub releases page. After this stage, the following artificats should be available:
44+
45+
- cryptoadvance.specter-1.13.1.tar.gz
46+
- Specter-Setup-v1.13.1.exe
47+
- specterd-v1.13.1-win64.zip
48+
- specterd-v1.13.1-x86_64-linux-gnu.zip
49+
- specter_desktop-v1.13.1-x86_64-linux-gnu.tar.gz
50+
51+
The three jobs in more detail:
52+
- release_binary_windows: is creating a binary for specterd and for Windows (Windows runner)
53+
- release_electron_linux_windows: Creates a specterd for Linux, an AppImage for Linux and an executable for Windows (Linux runner).
54+
- release_pip: Is releasing a pypi package on [pypi](https://pypi.org/project/cryptoadvance.specter/) and creates a tarball of the pip package for the GitHub release page (Linux runner).
55+
56+
For details look at `.gitlab-ci.yml`
57+
58+
## MacOS
59+
Ideally, directly after the tag is created, start with the MacOS release. This has to be done manually, for now. There is a script for this:
60+
```bash
61+
./utils/build-osx.sh --version v1.13.1 --appleid "Satoshi Nakamoto (appleid)" --mail "[email protected]" make-hash specterd electron sign upload
62+
```
63+
64+
This script also runs `github.py upload `, so two more binares and the hash and signature files are uploaded to GitHub:
65+
66+
- Specter-v1.13.1.dmg
67+
- specterd-v1.13.1-osx.zip
68+
- SHA256SUMS-macos
69+
- SHA256SUMS-macos.asc
70+
71+
## GitLab - post releasing
72+
Back to GitLab, the final stage is "post releasing".
73+
74+
In this stage, the invididual SHA256-hashes and signatures are combined into two final files:
75+
- SHA256SUMS
76+
- SHA256SUMS.asc
77+
78+
Everything, apart from the MacOS files, are pulled from the GitLab environment, the MacOS files from GitHub.
79+
Don't forget to delete the two MacOS files (`SHA256SUMS-macos` and `SHA256SUMS-macos.asc`) on the GitHub release page in the end.
80+
81+
## All assets on GitHub
82+
83+
This should be the final result of all uploaded assets and files:
84+
85+
![](./images/release-guide/final-view-of-assets.png)
86+
87+
## Trouble shooting
88+
If the MacOS signatures are missing, the following Exception will be raised:
89+
```bash
90+
File "/builds/cryptoadvance/specter-desktop/utils/github.py", line 295, in download_artifact
91+
raise Exception(
92+
Exception: Status-cod04 for url ... )
93+
```
94+
If the macOS binaries arrive on GitHub too late, you have to manually delete the already created `SHA256SUMS` and `SHA256SUMS.asc` and rerun the job release signatures in the latest stage on GitLab:
95+
96+
![](./images/release-guide/rerun-release-signatures.png)
97+
98+
## Editing the text on the GitHub release page
99+
We are running a script here to create a markdown file that can be used for copy and paste.
100+
Checkout this repo: `[email protected]:cryptoadvance/corp-notes.git`
101+
`cd download`
102+
Follow the instructions in `README.md`
103+
`./build.sh`
104+
105+
The result `gh_page.md` can then be found in the build directory.
106+
Edit the release on GitHub and paste this md-file there.
107+
108+
## Website
109+
The above script also produces html files for the website (in the same directory):
110+
- `download-page_current.html`
111+
- `download-page_releases.html`
112+
113+
Login into:
114+
https://specter.solutions/wp-login.php
115+
116+
Go to "Pages"
117+
Edit "Specter Desktop - Elementor" with Elementor
118+
Click somewhere on 1 (see screenshot), then somewhere on 2, select all, delete, and paste
119+
`download-page_current.html`
120+
121+
![](./images/release-guide/website-1.png)
122+
Then click update
123+
Be careful, not to paste the templates, otherwise you will see nasty jinja tags.
124+
125+
Do the same for this part of the website, just, in this case, replace it with
126+
`download-page_releases.html`
127+
128+
![](./images/release-guide/website-2.png)

0 commit comments

Comments
 (0)