Skip to content
This repository was archived by the owner on Dec 17, 2025. It is now read-only.

Commit 6ba4edd

Browse files
authored
Adjust permissions of the www-pipeline and add some basic documentation (#945)
* Add basic publishing documentation * Grand write permission to next.fritz2.dev publishing pipeline * Finalize docu
1 parent be2db88 commit 6ba4edd

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed

.github/workflows/libs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
jobs:
99
publish:
1010
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
1113
steps:
1214
- uses: actions/checkout@v4
1315

doc/PUBLISHING.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Publishing
2+
3+
fritz2 artifacts are published to [Maven Central](https://search.maven.org/search?q=g:dev.fritz2).
4+
5+
In order to authenticate, the GitHub actions workflows of this project use a bunch of secrets that are stored
6+
as GitHub repository secrets. Below you can find a guide on how to obtain these secrets.
7+
8+
## Overview of Required Secrets
9+
10+
| Secret Name | Description |
11+
|--------------------------|-----------------------------------------------------------------------|
12+
| `OSSRH_USERNAME` | Your Sonatype token username. |
13+
| `OSSRH_PASSWORD` | Your Sonatype token password / personal access token. |
14+
| `GPG_SIGNING_KEY` | Your GPG private key for signing artifacts. |
15+
| `GPG_SIGNING_PASSPHRASE` | The passphrase for your GPG private key. |
16+
| `FRITZ2_WEB_TOKEN` | Token for deploying the release build of the website to GitHub Pages. |
17+
18+
> [!NOTE]
19+
> Note: The `snapshot`-version of the website is hosted via GitHub pages in _this_ repository, so no additional secrets
20+
> are needed for that.
21+
> The `release`-version of the website is hosted via GitHub pages in the
22+
> [fritz2-web](https://github.com/jwstegemann/fritz2-web) repository, so an additional secret (`FRITZ2_WEB_TOKEN`) is
23+
> needed for that. It is a personal access token with write access to the `fritz2-web` repository.
24+
25+
## Obtaining Credentials
26+
27+
### 1. `OSSRH_USERNAME`, `OSSRH_PASSWORD`
28+
29+
Log in to your Sonatype account and generate a personal access token.
30+
You will receive a username and password/token to use for publishing.
31+
32+
### 2. `GPG_SIGNING_KEY`, `GPG_SIGNING_PASSPHRASE`
33+
34+
Maven Central requires the submitted artifacts to be signed with GPG.
35+
Below are instructions on how to create a GPG key pair and export the necessary information:
36+
37+
1. **Generate a GPG Key Pair:**
38+
```sh
39+
gpg --full-generate-key
40+
```
41+
- Type: RSA and RSA (or ECC), at least 4096 bits recommended.
42+
- Choose a passphrase you’ll remember (`GPG_SIGNING_PASSPHRASE`).
43+
44+
2. **Export your GPG Private Key (for signing):**
45+
```sh
46+
gpg --armor --export-secret-keys YOUR_KEY_ID
47+
```
48+
- Replace `YOUR_KEY_ID` with your GPG key’s ID (`gpg --list-secret-keys`).
49+
- Copy the entire output (including `-----BEGIN PGP PRIVATE KEY BLOCK-----`).
50+
- This will be the value for `GPG_SIGNING_KEY`.
51+
52+
3. **Export your GPG Public Key (upload to key server):**
53+
```sh
54+
gpg --armor --export YOUR_KEY_ID
55+
```
56+
- Upload this public key to a key server (e.g., [keyserver.ubuntu.com](https://keyserver.ubuntu.com/)) so Maven
57+
Central can verify your signature.

0 commit comments

Comments
 (0)