Skip to content

Commit a55c6f8

Browse files
committed
Add release process documentation
1 parent 5877e40 commit a55c6f8

1 file changed

Lines changed: 200 additions & 0 deletions

File tree

Lines changed: 200 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
# Making Releases on GitHub
2+
3+
```{note} This guide is only relevant for maintainers with commit rights.
4+
```
5+
6+
## Overview
7+
8+
Releases in the voc4cat repository publish versioned snapshots of the vocabulary and documentation to permanent URLs following the pattern `https://w3id.org/nfdi4cat/voc4cat/vYYYY-MM-DD`. The release process is automated via GitHub Actions, triggered by pushing a tag with the version pattern.
9+
10+
The voc4cat version tags reflect the date when a release is created.
11+
Tags must follow the pattern `vYYYY-MM-DD`:
12+
13+
- `v2025-05-22` ✓ Correct
14+
- `2025-05-22` ✗ Wrong (missing 'v' prefix)
15+
- `v20250522` ✗ Wrong (missing hyphens)
16+
17+
## Prerequisites
18+
19+
Before creating a release, ensure:
20+
21+
1. All vocabulary changes have been merged to the `main` branch
22+
2. The development version (`/dev/`) has been rebuilt and is accessible at <https://w3id.org/nfdi4cat/voc4cat/dev>
23+
3. You have tested the development documentation to verify correctness
24+
4. You have commit/push rights to the repository
25+
26+
## Release Process
27+
28+
### Step 1: Update Release Information in Documentation
29+
30+
The `docs/index.md` file contains references to the latest release version that need to be updated before creating a new release.
31+
32+
Navigate to your local clone of the voc4cat repository. Make sure you are on the main branch and have the latest changes:
33+
34+
```bat
35+
C:\Users\dlinke\MyProg_local\gh-nfdi4cat\voc4cat
36+
λ git switch main
37+
λ git pull
38+
```
39+
40+
Create a feature branch for the documentation update:
41+
42+
```bat
43+
C:\Users\dlinke\MyProg_local\gh-nfdi4cat\voc4cat(main -> origin)
44+
λ git switch -c release-prep-vYYYY-MM-DD
45+
Switched to a new branch 'release-prep-vYYYY-MM-DD'
46+
```
47+
48+
Open the `docs/index.md` file in your editor and update:
49+
50+
1. The announcement banner (in `docs/conf.py`):
51+
```python
52+
"announcement": 'New: <strong> Release YYYY-MM-DD </strong> includes ...',
53+
```
54+
55+
2. The latest release reference (in `docs/index.md`):
56+
```markdown
57+
+++
58+
<small>Latest release **vYYYY-MM-DD**</small>
59+
```
60+
61+
3. Add the new release to the "All releases" section (in `docs/index.md`):
62+
```markdown
63+
- **vYYYY-MM-DD**: [Documentation (HTML)](https://w3id.org/nfdi4cat/voc4cat/vYYYY-MM-DD), permanent url `https://w3id.org/nfdi4cat/voc4cat/vYYYY-MM-DD`
64+
```
65+
66+
### Step 2: Create and Merge Pull Request
67+
68+
Commit and push your documentation changes:
69+
70+
```bat
71+
C:\Users\dlinke\MyProg_local\gh-nfdi4cat\voc4cat(release-prep-vYYYY-MM-DD)
72+
λ git add docs/index.md docs/conf.py
73+
74+
C:\Users\dlinke\MyProg_local\gh-nfdi4cat\voc4cat(release-prep-vYYYY-MM-DD)
75+
λ git commit -m "Prepare documentation for vYYYY-MM-DD release"
76+
77+
C:\Users\dlinke\MyProg_local\gh-nfdi4cat\voc4cat(release-prep-vYYYY-MM-DD)
78+
λ git push --set-upstream origin release-prep-vYYYY-MM-DD
79+
```
80+
81+
Create a pull request on GitHub and get the PR reviewed and approved by another maintainer.
82+
83+
Then merge it to `main`. After merging, delete the feature branch on GitHub.
84+
85+
### Step 3: Pull Updated Main Branch
86+
87+
Switch back to main and pull the merged changes:
88+
89+
```bat
90+
C:\Users\dlinke\MyProg_local\gh-nfdi4cat\voc4cat(release-prep-vYYYY-MM-DD)
91+
λ git switch main
92+
Switched to branch 'main'
93+
94+
C:\Users\dlinke\MyProg_local\gh-nfdi4cat\voc4cat(main -> origin)
95+
λ git pull
96+
```
97+
98+
Clean up the local feature branch:
99+
100+
```bat
101+
C:\Users\dlinke\MyProg_local\gh-nfdi4cat\voc4cat(main -> origin)
102+
λ git branch -d release-prep-vYYYY-MM-DD
103+
```
104+
105+
### Step 4: Create and Push Release Tag
106+
107+
Create a tag following the pattern `vYYYY-MM-DD` (e.g., `v2025-05-22`):
108+
109+
```bat
110+
C:\Users\dlinke\MyProg_local\gh-nfdi4cat\voc4cat(main -> origin)
111+
λ git tag v2025-05-22
112+
```
113+
114+
Push the tag to GitHub:
115+
116+
```bat
117+
C:\Users\dlinke\MyProg_local\gh-nfdi4cat\voc4cat(main -> origin)
118+
λ git push origin v2025-05-22
119+
Enumerating objects: 1, done.
120+
Counting objects: 100% (1/1), done.
121+
Writing objects: 100% (1/1), 164 bytes | 164.00 KiB/s, done.
122+
Total 1 (delta 0), reused 0 (delta 0), pack-reused 0
123+
To https://github.com/nfdi4cat/voc4cat.git
124+
* [new tag] v2025-05-22 -> v2025-05-22
125+
```
126+
127+
### Step 5: Monitor Automated Publish Workflow
128+
129+
The push of a tag matching `v[0-9]+-[0-9]+-[0-9]+` triggers the `.github/workflows/publish.yml` workflow automatically. This workflow:
130+
131+
1. Checks out the tagged commit and the `gh-pages` branch
132+
2. Builds the joined vocabulary file from individual Turtle files
133+
3. Generates pyLODE documentation (HTML)
134+
4. Creates Excel and XML/RDF files from the vocabulary
135+
5. Builds the Sphinx documentation site
136+
6. Copies all outputs to both `publish/latest/` and `publish/vYYYY-MM-DD/` directories
137+
7. Publishes everything to the `gh-pages` branch
138+
139+
Monitor the workflow:
140+
141+
1. Navigate to <https://github.com/nfdi4cat/voc4cat/actions>
142+
2. Look for the "Publish" workflow run triggered by your tag
143+
3. Wait for completion (typically 5-10 minutes)
144+
4. Check for any errors in the workflow logs
145+
146+
```{warning}
147+
If the publish workflow fails, the release is incomplete. Check the workflow logs and fix any issues. You may need to delete the tag, fix the problem, and retry.
148+
```
149+
150+
To delete a tag and retry:
151+
```bash
152+
git tag -d vYYYY-MM-DD # delete local tag
153+
git push --delete origin vYYYY-MM-DD # delete remote tag
154+
```
155+
156+
### Step 6: Create GitHub Release
157+
158+
Once the publish workflow completes successfully, create a GitHub Release from the tag:
159+
160+
1. Navigate to <https://github.com/nfdi4cat/voc4cat/releases>
161+
2. Click "Draft a new release"
162+
3. Click "Choose a tag" and select your version tag (e.g., `v2025-05-22`)
163+
4. Set the release title to match the tag (e.g., `v2025-05-22`)
164+
5. In the release notes, summarize the changes included in the new release. Follow the style of the previous release notes.
165+
6. Check "Set as the latest release"
166+
7. Click "Publish release"
167+
168+
### Step 7: Verify Release
169+
170+
After publishing, verify the release is accessible:
171+
172+
1. Check the permanent URL: `https://w3id.org/nfdi4cat/voc4cat/vYYYY-MM-DD`
173+
2. Verify the latest release redirects: `https://w3id.org/nfdi4cat/voc4cat`
174+
3. Check the Sphinx documentation site includes the new release
175+
4. Download and verify the Excel file from `https://nfdi4cat.github.io/voc4cat/vYYYY-MM-DD/voc4cat.xlsx`
176+
177+
## Release Artifacts
178+
179+
Each release publishes the following artifacts to the `gh-pages` branch under both `latest/` and `vYYYY-MM-DD/` directories:
180+
181+
| Artifact | Description |
182+
|----------|-------------|
183+
| `index.html` | pyLODE-generated HTML documentation of the vocabulary |
184+
| `voc4cat.ttl` | Joined Turtle/SKOS file containing the complete vocabulary |
185+
| `voc4cat.xml` | RDF/XML format of the vocabulary |
186+
| `voc4cat.xlsx` | Excel file generated from the vocabulary (for contributors) |
187+
| `voc4cat/` | Directory with individual Turtle files (one per concept/collection) |
188+
| `voc4cat.log` | Log file from voc4cat-tool operations |
189+
190+
The Sphinx documentation site is published to the root of `gh-pages`.
191+
192+
## Troubleshooting
193+
194+
### Yanking a Release
195+
196+
If a release is published with critical errors:
197+
198+
1. Mark it as "Pre-release" or delete it in the GitHub Releases UI
199+
2. Add an entry to the "Yanked releases" section in `docs/index.md`
200+
3. Create a new corrected release with an incremented date

0 commit comments

Comments
 (0)