Skip to content

Commit

Permalink
update project add workflow action
Browse files Browse the repository at this point in the history
  • Loading branch information
wwsheng009 committed Jan 22, 2024
1 parent d6b667e commit 5c56cd4
Show file tree
Hide file tree
Showing 21 changed files with 83 additions and 35 deletions.
16 changes: 3 additions & 13 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
YAO_DB_DRIVER="sqlite3"
YAO_DB_PRIMARY="db/yao.db"
YAO_ENV="development"
YAO_HOST="0.0.0.0"
YAO_LANG="zh-cn"
YAO_LOG="logs/application.log"
YAO_LOG_MODE="TEXT"
YAO_PORT="5099"
YAO_SESSION_FILE="db/.session"
YAO_SESSION_STORE="file"
YAO_STUDIO_PORT="5077"
OPENAI_KEY="sk-123456"
HTTPS_PROXY="socks5://0.0.0.0:10808"
# email account
EMAIL_USERNAME=
# email password or access code
EMAIL_PASSWORD=
# send to
EMAIL_TO=
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Go Build and Publish Release

on:
workflow_dispatch:
inputs:
tags:
description: "Version tags"
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: "1.21.6"

- name: Build Go project
run: |
GOOS=linux CGO_ENABLED=0 GOARCH=amd64 go build -o email-linux-amd64.so
GOOS=linux CGO_ENABLED=0 GOARCH=arm64 go build -o email-linux-arm64.so
chmod +x email-*.so
ls -lart
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: email-linux-plugin
files: |
*.so
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get Release URL
run: |
echo "Release URL: ${{ steps.create_release.outputs.upload_url }}"
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
logs
*.so
.env
plugins/email/data
data
data/emails
yaoapp/plugins/email/data
yaoapp/plugins/data
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

build:
CGO_ENABLED=0 go build -o yaoapp/plugins/email.so

windows:
set CGO_ENABLED=0
go build -o yaoapp/plugins/email.dll

.PHONY: clean
clean:
rm -f yaoapp/plugins/email.so
File renamed without changes.
2 changes: 1 addition & 1 deletion plugins/email/go.mod → go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ require (
github.com/emersion/go-message v0.15.0
github.com/joho/godotenv v1.5.1
github.com/yaoapp/kun v0.9.0
golang.org/x/text v0.3.7
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
)

Expand All @@ -27,7 +28,6 @@ require (
github.com/oklog/run v1.1.0 // indirect
golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d // indirect
golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8 // indirect
google.golang.org/grpc v1.40.0 // indirect
google.golang.org/protobuf v1.27.1 // indirect
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions plugins/email/.gitignore

This file was deleted.

11 changes: 0 additions & 11 deletions plugins/email/Makefile

This file was deleted.

7 changes: 2 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,15 @@

yao-plugin-email

[Document](https://wwsheng009.github.io/yao-docs/YaoDSL/Plugin/golang%20grpc%20%E6%8F%92%E4%BB%B6%E6%A8%A1%E6%9D%BF.html)

email send plugin for yao application。
email client plugin for yao application。use to send or receive the email。

the default plugin folder path is `<YAO_EXTENSION_ROOT>/plugins/`, the default value for YAO_EXTENSION_ROOT is the app folder, you can change the YAO_EXTENSION_ROOT in the .env file。


## build

```sh

cd plugins/email

make build
```

Expand Down
File renamed without changes.
File renamed without changes
19 changes: 19 additions & 0 deletions yaoapp/.env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
YAO_DB_DRIVER="sqlite3"
YAO_DB_PRIMARY="db/yao.db"
YAO_ENV="development"
YAO_HOST="0.0.0.0"
YAO_LANG="zh-cn"
YAO_LOG="logs/application.log"
YAO_LOG_MODE="TEXT"
YAO_PORT="5099"
YAO_SESSION_FILE="db/.session"
YAO_SESSION_STORE="file"
YAO_STUDIO_PORT="5077"
OPENAI_KEY="sk-123456"
HTTPS_PROXY=""
# email account
EMAIL_USERNAME=
# email password or access code
EMAIL_PASSWORD=
# send to
EMAIL_TO=
File renamed without changes.
File renamed without changes
Binary file added yaoapp/plugins/email.dll
Binary file not shown.
1 change: 1 addition & 0 deletions yaoapp/plugins/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# plugin
File renamed without changes.

0 comments on commit 5c56cd4

Please sign in to comment.