Skip to content

Commit

Permalink
feat(release): set up goreleaser for automated releases
Browse files Browse the repository at this point in the history
Set up a CI/CD workflow using goreleaser to automate the process of creating releases. This includes defining build targets, snapshots, and release archives,
as well as integrating with GitHub for publishing. The goreleaser configuration
ensures that releases are generated for multiple platforms and architectures.
  • Loading branch information
godcong committed Aug 15, 2024
1 parent f7740a6 commit e3c1093
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 5 deletions.
5 changes: 1 addition & 4 deletions cmd/init.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// Copyright (c) 2024 OrigAdmin. All rights reserved.

// Package cmd defines a CLI command to start a server with various flags and options, including the
// ability to run as a daemon.
// It includes functions to create and manage the command, as well as the logic to run the server.
// It also includes a function to create a new server instance and start it.
// Package cmd defines a CLI command to init the project template.
package cmd

import (
Expand Down
3 changes: 3 additions & 0 deletions config/app.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2024 OrigAdmin. All rights reserved.

// Package config is the config package for origen
package config

type App struct {
Expand Down
3 changes: 3 additions & 0 deletions config/backend.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2024 OrigAdmin. All rights reserved.

// Package config is the config package for origen
package config

type Backend struct {
Expand Down
13 changes: 13 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2024 OrigAdmin. All rights reserved.

// Package config is the config package for origen
package config

import (
Expand Down Expand Up @@ -66,3 +69,13 @@ var (
func C() Config {
return config
}

// LoadGlobal loads config from file
func LoadGlobal(path string) {
once.Do(func() {
err := Load(path, &config)
if err != nil {
panic(err)
}
})
}
3 changes: 3 additions & 0 deletions config/database.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2024 OrigAdmin. All rights reserved.

// Package config is the config package for origen
package config

type Database struct {
Expand Down
3 changes: 3 additions & 0 deletions config/extention.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2024 OrigAdmin. All rights reserved.

// Package config is the config package for origen
package config

type Extension struct {
Expand Down
3 changes: 3 additions & 0 deletions config/fontend.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) 2024 OrigAdmin. All rights reserved.

// Package config is the config package for origen
package config

type Fontend struct {
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//go:generate swag init --parseDependency --generalInfo ./main.go --output ./docs
// #go:generate docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate --git-repo-id swagger-api --git-user-id origadmin -i /local/docs/swagger.json -g go-gin-server -o /local/docs/v3

// Package main is the main package
// Package main is the main package for origen
package main

import (
Expand Down

0 comments on commit e3c1093

Please sign in to comment.