You should follow the official Forgejo Contributor Guide. However it lacks a few useful things, below you can find.
It's recommended to use the devcontainer.
Building
To build, the official instructions generally suffice
Build a single image for multiple architectures:
podman build --platform linux/amd64,linux/arm64 --manifest user/repo:tag .
Replace the tag. You can add more architectures, if you wish.
Live reload
TAGS='sqlite sqlite_unlock_notify' make watch
Merge
Make sure you checked out the branch to merge to.
git remote add upstream https://codeberg.org/forgejo/forgejo.git
git fetch --no-tags upstream
git merge upstream/$BRANCH
Tag a release
git tag $TAG
git push origin tag $TAG
Build & release to hub
RELEASE_VERSION=13.0.4
podman build --build-arg RELEASE_VERSION=$RELEASE_VERSION --platform linux/amd64,linux/arm64 --manifest docker.io/git724/forgejo:$RELEASE_VERSION .
podman manifest push docker.io/git724/forgejo:$RELEASE_VERSION
podman manifest push git724/forgejo:$RELEASE_VERSION docker.io/git724/forgejo:latest
Binary:
make clean-all
TAGS="bindata timetzdata sqlite sqlite_unlock_notify" make build
make frontend