-
-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Tim Hårek Andreassen <tim@harek.no>
- Loading branch information
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
sidebar_position: 11 | ||
--- | ||
|
||
# Sourcehut Builds | ||
|
||
It is possible to generate changelogs using [SourceHut builds](https://builds.sr.ht). | ||
|
||
```yaml | ||
image: alpine/edge | ||
packages: | ||
- git-cliff | ||
secrets: | ||
- <your-builds.sr.ht-secret> | ||
sources: | ||
- git://git@git.sr.ht:~<username>/<repo-name> | ||
environment: | ||
dir: <repo-name> | ||
source: <your-source> | ||
tasks: | ||
- git-cliff: | | ||
cd $dir | ||
cd $dir | ||
git cliff -o CHANGELOG.md | ||
ssh-keyscan -t rsa git.sr.ht >> ~/.ssh/known_hosts | ||
git remote set-url origin $source | ||
git checkout main | ||
git add CHANGELOG.md | ||
git commit -m "chore(release): Update CHANGELOG" | ||
git push -o skip-ci | ||
``` | ||
1. Generate a new SSH-key for SourceHut builds: | ||
`ssh-keygen -t ed25519 -C "builds.sr.ht" -f ~/.ssh/builds-srht` | ||
1. Add the newly generated public key to your | ||
[SourceHut account](https://meta.sr.ht/keys). | ||
1. Add the private key as a secret to your | ||
[Sourcehut Builds](https://builds.sr.ht/secrets). | ||
1. Replace all the placeholders in you `.build.yml`: | ||
- `<your-builds.sr.ht-secret>` | ||
- `<username>` | ||
- `<repo-name>` | ||
- `<your-source>` |