Add Gitea release trigger for Go package publishing
This commit is contained in:
1 parent
61b1eda37d
commit
d3cb76dc32
2 files changed
+5
-2
No files matched your search
@@ -4,6 +4,9 @@ on:
|
||||
push:
|
||||
tags:
|
||||
- 'backend/v*'
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
@@ -32,7 +35,7 @@ jobs:
|
||||
|
||||
- name: Package Go module
|
||||
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"
|
||||
|
||||
- name: Publish to Gitea Package Registry
|
||||
|
||||
@@ -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.
|
||||
|
||||
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:
|
||||
|
||||
|
||||
Reference in new issue
Block a user