-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into feat/cicd_deploy
- Loading branch information
Showing
40 changed files
with
4,040 additions
and
112,359 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Release Build | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install Snapcraft | ||
uses: samuelmeuli/action-snapcraft@v2 | ||
|
||
- name: Checkout tag | ||
run: | | ||
git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
tag_name="${GITHUB_REF##*/}" | ||
echo Current tag: $tag_name | ||
git checkout $tag_name | ||
echo "TAG_NAME=${tag_name}" >> $GITHUB_ENV | ||
- name: Check VERSION consistency | ||
run: | | ||
tag=$(git describe --tags --dirty) | ||
version=$(cat VERSION) | ||
if [ "$tag" != "$version" ]; then | ||
echo "VERSION file is not consistent with tag name" | ||
echo "VERSION: $version" | ||
echo "TAG: $tag" | ||
exit 1 | ||
fi | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.19" | ||
|
||
- name: Release with goreleaser | ||
uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
# either 'goreleaser' (default) or 'goreleaser-pro' | ||
distribution: goreleaser | ||
version: latest | ||
args: release --clean -p 4 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# - name: Upload deb/rpm to Fury.io | ||
# run: | | ||
# for file in dist/*.{deb,rpm} | ||
# do | ||
# echo "Uploading $file to Fury.io" | ||
# curl -sS -F package=@$file https://[email protected]/goplus/ | ||
# done | ||
# env: | ||
# FURY_TOKEN: ${{ secrets.FURY_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,9 @@ | |
|
||
# Go workspace file | ||
go.work | ||
|
||
# env file | ||
.env | ||
|
||
# Autogenerated files from goplus generate | ||
gop_autogen.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# This is an example .goreleaser.yml file with some sensible defaults. | ||
# Make sure to check the documentation at https://goreleaser.com | ||
|
||
# The lines below are called `modelines`. See `:help modeline` | ||
# Feel free to remove those if you don't want/need to use them. | ||
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json | ||
# vim: set ts=2 sw=2 tw=0 fo=cnqoj | ||
|
||
version: 1 | ||
|
||
before: | ||
hooks: | ||
# You may remove this if you don't use go modules. | ||
# you may remove this if you don't need go generate | ||
|
||
builds: | ||
- id: 'gopcomm' | ||
main: ./cmd/gopcomm/gop_autogen.go | ||
binary: gopcomm | ||
env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
|
||
archives: | ||
- format: tar.gz | ||
# this name template makes the OS and Arch compatible with the results of `uname`. | ||
name_template: >- | ||
{{ .ProjectName }}_ | ||
{{- title .Os }}_ | ||
{{- if eq .Arch "amd64" }}x86_64 | ||
{{- else if eq .Arch "386" }}i386 | ||
{{- else }}{{ .Arch }}{{ end }} | ||
{{- if .Arm }}v{{ .Arm }}{{ end }} | ||
# use zip for windows archives | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
files: | ||
- LICENSE | ||
- README.md | ||
|
||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- "^docs:" | ||
- "^test:" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# | ||
# Copyright (c) 2023 The GoPlus Authors (goplus.org). All rights reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
### Account Config | ||
GOP_ACCOUNT_ENDPOINT="0.0.0.0:8081" | ||
|
||
### Community Config | ||
GOP_COMMUNITY_ENDPOINT="0.0.0.0:8080" | ||
|
||
# Database DSN | ||
GOP_COMMUNITY_DSN= | ||
|
||
# Qiniu Storage | ||
GOP_COMMUNITY_BLOBUS= | ||
GOP_COMMUNITY_DOMAIN= | ||
|
||
# Qiniu Dora Service | ||
QINIU_ACCESS_KEY= | ||
QINIU_SECRET_KEY= | ||
|
||
# XiaoQiu Translation Service | ||
QIU_TRANSLATION_KEY= | ||
|
||
# XiaoQiu Translation Service | ||
NIUTRANS_API_KEY= | ||
|
||
# Casdoor config | ||
GOP_CASDOOR_CERTIFICATE= |
Oops, something went wrong.