Update Dagger pipeline and documentation for Gitea release upload and .env handling

This commit is contained in:
Bastian Bührig
2025-07-11 09:53:35 +02:00
parent b8eaab679a
commit 3ed43bda8b
6 changed files with 192 additions and 4 deletions

View File

@@ -218,19 +218,35 @@ The pipeline is defined in [`ci/dagger.go`](./ci/dagger.go). It outputs binaries
### Usage
1. Install the Dagger Go SDK:
1. Install the Dagger Go SDK and dependencies:
```sh
go install dagger.io/dagger@latest
go get github.com/joho/godotenv
go mod tidy
```
2. Run the pipeline:
2. Build for all platforms:
```sh
go run ci/dagger.go
```
3. (Optional) Upload binaries to a Gitea release:
- Create a `.env` file in the project root with:
```
GITEA_TOKEN=your_token
GITEA_URL=https://your.gitea.server
GITEA_OWNER=youruser
GITEA_REPO=yourrepo
```
- Run:
```sh
go run ci/dagger.go --release v1.0.0
```
- This will create (if needed) and upload all binaries to the specified release tag on your Gitea instance.
- **The pipeline will also create and push a local git tag for the release if it does not already exist.**
### Troubleshooting Dagger
- If you see `could not import dagger.io/dagger`, make sure you have installed the Dagger Go SDK and run `go mod tidy`.
- The pipeline requires Docker or a compatible container runtime.
- For Gitea upload, ensure your `.env` file is present and correct.
## Troubleshooting