Add Gitea release trigger for Go package publishing

This commit is contained in:
Gabriel20xx committed 2026-08-06 10:58:20 +02:00
1 parent 61b1eda37d
commit d3cb76dc32
2 files changed
+5 -2

No files matched your search

+4 -1
View File
@@ -4,6 +4,9 @@ on:
push: push:
tags: tags:
- 'backend/v*' - 'backend/v*'
release:
types:
- published
jobs: jobs:
publish: publish:
@@ -32,7 +35,7 @@ jobs:
- name: Package Go module - name: Package Go module
env: env:
RELEASE_TAG: ${{ github.ref_name }} RELEASE_TAG: ${{ github.event_name == 'release' && github.event.release.tag_name || github.ref_name }}
run: bash scripts/package-go-module.sh "$RELEASE_TAG" "$RUNNER_TEMP/gitea-go-package" run: bash scripts/package-go-module.sh "$RELEASE_TAG" "$RUNNER_TEMP/gitea-go-package"
- name: Publish to Gitea Package Registry - name: Publish to Gitea Package Registry
+1 -1
View File
@@ -143,7 +143,7 @@ Use `auth.SchemaOptions{SingleUser: false, APITokens: true}` for a multi-user se
For embedded SQL migrations, use `migrate.Up(ctx, databaseURL, embeddedMigrations, "migrations")`. The package does not contain application tables, so migrations remain versioned with the service that owns those tables. For embedded SQL migrations, use `migrate.Up(ctx, databaseURL, embeddedMigrations, "migrations")`. The package does not contain application tables, so migrations remain versioned with the service that owns those tables.
The Go module lives under `backend`, so its release tag must use the submodule prefix (`backend/v0.1.0`). The consuming `go.mod` uses the normal module version (`v0.1.0`). To publish a release, push a tag such as `backend/v0.1.0`; the Gitea workflow packages the module and uploads it to the private registry. Never reuse an existing package version. The Go module lives under `backend`, so its release tag must use the submodule prefix (`backend/v0.1.0`). The consuming `go.mod` uses the normal module version (`v0.1.0`). To publish a release, push a tag such as `backend/v0.1.0`; the Gitea workflow packages the module and uploads it to the private registry. The workflow also listens for Gitea's `release.published` event, so a release can be published from the Gitea Releases page to manually retry a failed upload for an existing tag. Never reuse a package version that was already uploaded successfully.
For Node services, install the shared package after publishing it: For Node services, install the shared package after publishing it: