diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index 743faab..f1a850b 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -32,3 +32,7 @@ jobs: # Gitea injects a repo-scoped token automatically; GoReleaser reads # GITEA_TOKEN to publish the release to this instance. GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # The uploads block authenticates to the generic package registry via + # basic auth (username from config + this token as the password). + # GoReleaser derives the env name from the upload name: gitea -> GITEA_SECRET. + GITEA_SECRET: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 7d06b1b..3e105c0 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -66,3 +66,16 @@ release: gitea: owner: texasmade name: RocketLeagueBot-Renderer + +# Upload each built binary to the Gitea generic package registry. The os/arch +# is encoded in the version segment, e.g. +# /api/packages/texasmade/generic/RocketLeagueBot-Renderer/1.0.0_darwin_amd64/RocketLeagueBot-Renderer +uploads: + - name: gitea + method: PUT + mode: binary + target: https://git.destefano.cloud/api/packages/texasmade/generic/{{ .ProjectName }}/{{ .Version }}_{{ .Os }}_{{ .Arch }}/{{ .ArtifactName }} + username: texasmade + # Password/token comes from the env var {NAME}_SECRET -> GITEA_SECRET. + custom_headers: + Content-Type: application/octet-stream