Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
819 commits
Select commit Hold shift + click to select a range
599740e
update fate
godcong Mar 22, 2020
f3e3297
update fate
godcong Mar 31, 2020
5786898
update fate
godcong Mar 31, 2020
d40cd4f
update fate
godcong Mar 31, 2020
f9d0289
Update README.md
godcong Apr 1, 2020
6687de2
Create zodiac.md
godcong Apr 1, 2020
bab9ee7
Update and rename zodiac.md to zodiac_shu.md
godcong Apr 1, 2020
a6ad7ba
Create go.yml
godcong Apr 7, 2020
9e3bc88
Update go.yml
godcong Apr 7, 2020
d10cff0
Update go.yml
godcong Apr 7, 2020
d925213
Update go.yml
godcong Apr 7, 2020
a8e90f1
Update go.yml
godcong Apr 7, 2020
be85a66
Update go.yml
godcong Apr 7, 2020
faa2de5
Update go.yml
godcong Apr 7, 2020
e83324b
Update go.yml
godcong Apr 7, 2020
c340184
Update go.yml
godcong Apr 7, 2020
ac8e6b9
Update go.yml
godcong Apr 7, 2020
a59ca48
Update go.yml
godcong Apr 7, 2020
30c8f85
Update go.yml
godcong Apr 7, 2020
eedf65d
Update go.yml
godcong Apr 7, 2020
beb22a5
Update go.yml
godcong Apr 7, 2020
75f1fa3
Update go.yml
godcong Apr 7, 2020
aad84b0
Update go.yml
godcong Apr 7, 2020
af2cd64
Update go.yml
godcong Apr 7, 2020
ef51ca3
Update go.yml
godcong Apr 7, 2020
b7658f5
Update go.yml
godcong Apr 7, 2020
3e548dc
Update go.yml
godcong Apr 7, 2020
f59ef8c
Update go.yml
godcong Apr 7, 2020
fff366c
Update go.yml
godcong Apr 7, 2020
f6cd19e
Update go.yml
godcong Apr 7, 2020
4261a1a
Update go.yml
godcong Apr 7, 2020
546d8d0
Update go.yml
godcong Apr 7, 2020
7b8284a
Update go.yml
godcong Apr 7, 2020
6d82288
Update go.yml
godcong Apr 7, 2020
7978fe3
Update go.yml
godcong Apr 7, 2020
0875199
Update go.yml
godcong Apr 7, 2020
76b20ad
Update go.yml
godcong Apr 7, 2020
e620af9
Update go.yml
godcong Apr 7, 2020
389bb7b
Update go.yml
godcong Apr 7, 2020
7a15ec6
Update go.yml
godcong Apr 7, 2020
94de7a3
Update go.yml
godcong Apr 7, 2020
e50ed91
Update go.yml
godcong Apr 7, 2020
b97ccf4
Update go.yml
godcong Apr 7, 2020
8924dce
Update go.yml
godcong Apr 7, 2020
2e0e19f
Update go.yml
godcong Apr 7, 2020
5cdf302
Update go.yml
godcong Apr 7, 2020
ef8c487
Update go.yml
godcong Apr 8, 2020
9665ef5
Update go.yml
godcong Apr 8, 2020
a56a6fa
Update go.yml
godcong Apr 8, 2020
ff240a3
Update go.yml
godcong Apr 8, 2020
5cbd234
Update go.yml
godcong Apr 8, 2020
f6a5f84
Update go.yml
godcong Apr 8, 2020
026587d
Update go.yml
godcong Apr 8, 2020
820da6e
Update go.yml
godcong Apr 8, 2020
dc366a9
Update go.yml
godcong Apr 8, 2020
4205193
Update go.yml
godcong Apr 8, 2020
13339be
Update go.yml
godcong Apr 8, 2020
ed31a60
Update go.yml
godcong Apr 8, 2020
836dc47
Update go.yml
godcong Apr 8, 2020
90cc793
Update go.yml
godcong Apr 8, 2020
50970bc
Update go.yml
godcong Apr 8, 2020
f01c9fb
Update go.yml
godcong Apr 8, 2020
776e11a
Update go.yml
godcong Apr 8, 2020
c410cbb
Update go.yml
godcong Apr 8, 2020
04c5d91
Update go.yml
godcong Apr 8, 2020
6fdb1c0
Update go.yml
godcong Apr 8, 2020
953b163
Update README.md
godcong Apr 8, 2020
b1ea41b
Update README.md
godcong Apr 8, 2020
8ad3ab2
Update README.md
godcong Apr 8, 2020
f11b08b
Update README.md
godcong Apr 8, 2020
7f37e91
Update README.md
godcong Apr 8, 2020
7b9ae5e
Update README.md
godcong Apr 8, 2020
26e1297
Update README.md
godcong Apr 8, 2020
152fb72
Update README.md
godcong Apr 8, 2020
fac8828
Update README.md
godcong Apr 8, 2020
14cfe3b
Update README.md
godcong Apr 8, 2020
d615074
Update README.md
godcong Apr 8, 2020
9d39f65
Update README.md
godcong Apr 8, 2020
c125b56
Update README.md
godcong Apr 8, 2020
e226a46
Update README.md
godcong Apr 8, 2020
439f7ee
Update README.md
godcong Apr 8, 2020
8649fb0
Update go.yml
godcong Apr 8, 2020
8a0cc11
Update go.yml
godcong Apr 8, 2020
bdd90db
Update go.yml
godcong Apr 8, 2020
5645c29
Update README.md
godcong Apr 8, 2020
8587c94
Update README.md
godcong Apr 8, 2020
4a39961
Update README.md
godcong Apr 8, 2020
5dfa8c5
Update README.md
godcong Apr 8, 2020
2f0b1ba
Update go.yml
godcong Apr 9, 2020
b756003
Update README.md
godcong Apr 13, 2020
3613d93
Update README.md
godcong Apr 13, 2020
7479ed3
Update go.yml
godcong Apr 13, 2020
0941d98
update fate
godcong Apr 15, 2020
aee5a26
update fate
godcong Apr 15, 2020
484fa7f
Update issue templates
godcong May 9, 2020
5b28f87
Update README.md
godcong May 9, 2020
4d7096f
Update README.md
godcong May 9, 2020
68c527a
Update README.md
godcong May 12, 2020
40f29af
Update README.md
godcong May 16, 2020
7506617
update fate
godcong May 16, 2020
c199e8f
update fate
godcong May 16, 2020
91e22e4
update fate
godcong May 16, 2020
2c8ed31
Update README.md
godcong May 18, 2020
39069a2
Update README.md
godcong May 19, 2020
a5699b4
Update bug_report.md
godcong May 19, 2020
2ff6fde
减少不必要的重复查询,优化查询速度
fesiong May 30, 2020
ad4985d
Merge pull request #63 from fesiong/master
godcong May 30, 2020
f736520
减少八字生成次数,提升生成速度
fesiong May 31, 2020
0a36cbd
Merge pull request #64 from fesiong/master
godcong Jun 1, 2020
a235664
Update README.md
godcong Jun 11, 2020
93ea00b
update fate
godcong Jun 11, 2020
990986d
update fate
godcong Jun 11, 2020
1b6a548
update fate
godcong Jun 11, 2020
d67b6d2
update fate
godcong Jun 11, 2020
37b4a07
update fate
godcong Jun 13, 2020
4d14af5
update fate
godcong Jun 13, 2020
cea78a1
Update README.md
godcong Jun 20, 2020
737802b
Update README.md
godcong Jun 20, 2020
d2b4656
Update README.md
godcong Jun 20, 2020
23d983c
Update README.md
godcong Jun 20, 2020
5f01b3b
fix issue #68
godcong Jun 28, 2020
30c93a2
fix: add guard for issue #67
godcong Jun 30, 2020
3de4e71
fix issues #69
godcong Jul 1, 2020
ecf4c5f
Update go.yml
godcong Jul 3, 2020
bb0f10f
Update go.yml
godcong Jul 3, 2020
4841293
update fate
godcong Jul 29, 2020
d9041b9
update fate
godcong Jul 29, 2020
ee690d1
update fate
godcong Aug 2, 2020
dc977e0
update fate
godcong Aug 2, 2020
ec7d11e
update fate
godcong Aug 2, 2020
d8a6035
fix: change zoninfo to abs path
godcong Aug 17, 2020
6922e46
fix: #79
godcong Aug 17, 2020
e1eaa92
update fate
godcong Aug 17, 2020
7cd89c3
update fate
godcong Aug 25, 2020
1b782c0
update fate
godcong Sep 4, 2020
e82f5f0
update fate
godcong Sep 4, 2020
e0c7519
update fate
godcong Sep 28, 2020
03ced76
update fate
godcong Sep 28, 2020
32484dd
update fate
godcong Sep 28, 2020
75cd4d3
Update README.md
godcong Sep 28, 2020
666856b
Update README.md
godcong Sep 28, 2020
4342c97
Update README.md
godcong Sep 28, 2020
94dd595
update fate
godcong Oct 8, 2020
3e077a8
Merge branch 'master' of https://github.com/godcong/fate
godcong Oct 8, 2020
446a367
update fate
godcong Oct 8, 2020
5e7c4ea
update fate
godcong Oct 8, 2020
45760f8
update fate
godcong Nov 11, 2020
1ca9b6b
Update README.md
Z-fly Nov 15, 2020
14ef19a
Update README.md
Z-fly Nov 15, 2020
6c288ee
.
Dec 29, 2020
00291d1
update fate
Dec 29, 2020
ea02b38
Create 全国及各省重名查询网址汇总.md
Z-fly Dec 29, 2020
74099e0
Delete .DS_Store
Z-fly Dec 29, 2020
583e217
Update README.md
Z-fly Dec 29, 2020
de81e41
Update go.yml
godcong Dec 30, 2020
020fa9b
Merge pull request #84 from Z-fly/master
godcong Dec 30, 2020
648dcb5
Update README.md
godcong Dec 30, 2020
ba62708
Update README.md
godcong Dec 30, 2020
22f17ff
Update 全国及各省重名查询网址汇总.md
godcong Dec 30, 2020
44e8440
Update go.yml
godcong Jan 15, 2021
da22a72
Update go.yml
godcong Jan 15, 2021
a080177
Update README.md
godcong Apr 17, 2021
fe941f4
fix filename garbled
godcong May 26, 2021
2837896
add zodiac char process cmd
godcong May 26, 2021
cfe6d80
add zodiac char process cmd
godcong May 26, 2021
375d04c
Set theme jekyll-theme-minimal
godcong Jun 11, 2021
740528d
update zodiac
godcong Jun 25, 2021
deed321
update zodiac
godcong Jun 25, 2021
0617896
update zodiac
godcong Jun 25, 2021
bad9fab
update zodiac
godcong Jun 25, 2021
347616a
update zodiac
godcong Jun 25, 2021
4b48c09
update zodiac
godcong Jul 14, 2021
65f7c1e
update(zodiac)
godcong Aug 5, 2021
040872a
update(zodiac)
godcong Aug 5, 2021
2dde232
update(zodiac)
godcong Aug 5, 2021
155b2c0
change repo path: github.com/godcong/fate => github.com/babyname/fate
godcong Sep 24, 2021
87605bf
ci(workflows): add auto close/stale bot
godcong Sep 30, 2021
b5f005d
docs(readme): update document
godcong Sep 30, 2021
2ba4cf7
ci(workflows): update autobuild action
godcong Sep 30, 2021
0f40b99
ci(workflows): update autobuild action
godcong Sep 30, 2021
e4abb1a
ci(workflows): update autobuild action
godcong Sep 30, 2021
3cc56d8
ci(workflows): update autobuild action
godcong Sep 30, 2021
89a66e8
docs(readme): fix old link path
godcong Oct 11, 2021
2a83cfa
docs(readme): add english introduction
godcong Nov 8, 2021
0c2e21e
chore(github): update close-issues.yml
godcong Aug 8, 2022
e007b67
feat(fate): add sqlite3 support
godcong Oct 13, 2022
6f97376
feat(fate): remove zoneinfo.zip
godcong Oct 13, 2022
879f2ce
feat(fate): enable cgo build for action
godcong Oct 13, 2022
5fbb932
feat(fate): enable cgo build for action
godcong Oct 13, 2022
dcdecbe
feat(fate): enable cgo build for action
godcong Oct 13, 2022
3bd4676
feat(fate): upgrade build action package
godcong Oct 13, 2022
6705555
feat(fate): fix windows build error
godcong Oct 13, 2022
cfd1d93
feat(fate): update build env setting
godcong Oct 13, 2022
e2d6898
feat(fate): fix Error: The operation was canceled.
godcong Oct 13, 2022
6d27485
feat(fate): fix action build error
godcong Oct 13, 2022
d2b3043
feat(fate): fix action build error
godcong Oct 13, 2022
d81cd11
feat(fate): fix action build error
godcong Oct 13, 2022
2f7ceda
feat(fate): fix action build error
godcong Oct 13, 2022
78da106
feat(fate): fix action build windows error
godcong Oct 13, 2022
2d015d8
feat(fate): ignore linux 386 building
godcong Oct 13, 2022
1e323ef
feat(fate): fix windows amd64 building error
godcong Oct 13, 2022
d2e6d76
feat(fate): remove old env setting
godcong Oct 13, 2022
96eb13a
feat(fate): remove old env setting
godcong Oct 13, 2022
2dc33c1
feat(fate): fix windows env not found
godcong Oct 13, 2022
60243ce
feat(fate): update mysql package
godcong Oct 13, 2022
b08db50
feat(fate): add linux 386 build
godcong Oct 13, 2022
d61a3b4
feat(fate): fix autobuild release link wrong
godcong Oct 13, 2022
3070610
feat(fate): update go.mod
godcong Oct 19, 2022
6e08e6a
feat(fate): update readme
godcong Dec 2, 2022
e32092b
feat(fate): change sqlite3 to default db
godcong Dec 2, 2022
7990abc
feat(fate): change sqlite3 to default db
godcong Dec 2, 2022
cc3d301
feat(fate): change sqlite3 to default db
godcong Dec 2, 2022
a7ee7c8
feat(fate): update readme
godcong Dec 2, 2022
2aa7095
feat(fate): update readme
godcong Dec 2, 2022
9f725f2
feat(fate): update readme
godcong Dec 2, 2022
02fb553
feat(fate): add dependabot
godcong Jan 3, 2023
b647578
chore(deps): bump github.com/go-sql-driver/mysql from 1.6.0 to 1.7.0
dependabot[bot] Jan 3, 2023
d121e6c
chore(deps): bump github.com/xormsharp/builder from 0.3.6 to 0.3.8
dependabot[bot] Jan 3, 2023
0bf2805
Merge pull request #104 from babyname/dependabot/go_modules/github.co…
godcong Jan 3, 2023
0c3c947
Merge pull request #102 from babyname/dependabot/go_modules/github.co…
godcong Jan 3, 2023
0909ccc
chore(deps): bump github.com/spf13/cobra from 0.0.5 to 1.6.1
dependabot[bot] Jan 3, 2023
8a18ff7
chore(deps): bump github.com/xormsharp/xorm from 1.0.0 to 1.0.4
dependabot[bot] Jan 3, 2023
126c5cd
Merge pull request #100 from babyname/dependabot/go_modules/github.co…
godcong Jan 3, 2023
6e9d0a9
Merge pull request #103 from babyname/dependabot/go_modules/github.co…
godcong Jan 3, 2023
a5b6c7c
chore(deps): bump github.com/mattn/go-sqlite3 from 1.14.15 to 1.14.16
dependabot[bot] Jan 3, 2023
f697727
chore(deps): bump go.uber.org/zap from 1.13.0 to 1.24.0
dependabot[bot] Jan 3, 2023
cac006c
Merge pull request #107 from babyname/dependabot/go_modules/go.uber.o…
godcong Jan 4, 2023
031bc06
Merge pull request #106 from babyname/dependabot/go_modules/github.co…
godcong Jan 4, 2023
bedcd5b
chore(deps): bump github.com/google/uuid from 1.1.1 to 1.3.0
dependabot[bot] Jan 4, 2023
dfa37dc
Merge pull request #105 from babyname/dependabot/go_modules/github.co…
godcong Jan 4, 2023
a73525d
feat(fate): delete zoneinfo check
godcong Jan 9, 2023
b3c5a9c
feat(fate): add go.sum
godcong Jan 9, 2023
5eea419
feat(fate): fix package update build error
godcong Jan 9, 2023
32c8d50
feat(fate): fix doc link error
godcong Jan 10, 2023
585883c
feat(fate): split build yml
godcong Jan 10, 2023
95243e1
feat(fate): rename build.yml name
godcong Jan 10, 2023
82c6b85
feat(fate): rename build.yml name
godcong Jan 10, 2023
ffa130c
feat(fate): update build.yml
godcong Jan 10, 2023
427f521
feat(fate): update build.yml
godcong Jan 10, 2023
3bc5f89
feat(fate): update build.yml
godcong Jan 10, 2023
39be1b0
chore(deps): bump github.com/spf13/cobra from 1.6.1 to 1.7.0
dependabot[bot] Apr 4, 2023
cd4a183
Merge pull request #111 from babyname/dependabot/go_modules/github.co…
godcong Apr 6, 2023
e742d6f
chore(deps): bump github.com/go-sql-driver/mysql from 1.7.0 to 1.7.1
dependabot[bot] Apr 26, 2023
9444f27
Merge pull request #112 from babyname/dependabot/go_modules/github.co…
godcong Apr 27, 2023
c0dbfd5
chore(deps): bump github.com/mattn/go-sqlite3 from 1.14.16 to 1.14.17
dependabot[bot] Jun 1, 2023
16aaf70
Merge pull request #113 from babyname/dependabot/go_modules/github.co…
godcong Jun 2, 2023
fd388c5
refactor(fate): update comments and adjust code formatting
godcong Jun 27, 2024
727f3e7
chore(github-actions): update branch references from master to main
godcong Jun 27, 2024
ec3e608
chore(github-actions): update branch references and code formatting
godcong Jun 27, 2024
4657229
chore(deps): bump github.com/spf13/cobra from 1.7.0 to 1.10.2
dependabot[bot] Apr 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: bug
assignees: godcong

---

**Describe the bug**
A clear and concise description of what the bug is.

**Environment**
System: windows/linux/macos
Database: mysql version and fate_db version
Source: source release version or commit hash

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.
Issues that have not been followed up for more than 14 days may be closed

6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: gomod
directory: /
schedule:
interval: daily
95 changes: 95 additions & 0 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: Build Linux

on:
push:
branches: [main]
pull_request:
branches: [main]
env:
UPLOAD_BIN_FILE: true

jobs:
build:
name: Build
strategy:
matrix:
go-version: [1.19.x]
platform: [ubuntu-latest]
arch: [386, amd64]
runs-on: ${{ matrix.platform }}
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}

- name: Build ${{ matrix.platform }} ${{ matrix.arch }} with Go
if: (matrix.platform == 'ubuntu-latest' || matrix.platform == 'macos-latest') && matrix.arch == 'amd64' && env.UPLOAD_BIN_FILE
id: build_linux_amd64
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
run: |
go mod tidy
export GOARCH=${{ matrix.arch }}
export CGO_ENABLED=1
echo "FATENAME=fate_$(go env GOOS)_$(go env GOARCH)" >> $GITHUB_ENV
echo "$(go env GOOS) $(go env GOARCH)"

echo "building"
go build -o fate_$(go env GOOS)_$(go env GOARCH) -v ./cmd/console

echo "compress"
tar -zcvf fate_$(go env GOOS)_$(go env GOARCH).tar.gz ./fate_$(go env GOOS)_$(go env GOARCH)

- name: Build ${{ matrix.platform }} ${{ matrix.arch }} with Go
if: matrix.platform == 'ubuntu-latest' && matrix.arch == '386' && env.UPLOAD_BIN_FILE
id: build_linux_386
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
run: |
go mod tidy
export GOARCH=${{ matrix.arch }}
export CGO_ENABLED=1
sudo apt-get install -y gcc-i686-linux-gnu g++-i686-linux-gnu
export AR="/usr/bin/i686-linux-gnu-ar -m32"
export CXX="/usr/bin/i686-linux-gnu-cpp -m32"
export CC="/usr/bin/i686-linux-gnu-gcc -m32"
echo "FATENAME=fate_$(go env GOOS)_$(go env GOARCH)" >> $GITHUB_ENV
echo "$(go env GOOS) $(go env GOARCH)"

echo "building"
go build -o fate_$(go env GOOS)_$(go env GOARCH) -v ./cmd/console

echo "compress"
tar -zcvf fate_$(go env GOOS)_$(go env GOARCH).tar.gz ./fate_$(go env GOOS)_$(go env GOARCH)

- name: Upload Linux
uses: actions/upload-artifact@master
if: (matrix.platform == 'ubuntu-latest' || matrix.platform == 'macos-latest') && env.UPLOAD_BIN_FILE
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
with:
name: ${{ env.FATENAME }}.tar.gz
path: ${{ env.FATENAME }}.tar.gz

- name: Create Release
id: create_release_linux
if: (matrix.platform == 'ubuntu-latest' || matrix.platform == 'macos-latest') && env.UPLOAD_BIN_FILE
uses: ncipollo/release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
with:
artifacts: "${{ env.FATENAME }}.tar.gz"
allowUpdates: true
commit: master
tag: auto_build
body: |
This is only a latest build from master
**Version: https://github.com/babyname/fate/commit/${{ github.sha }}**
token: ${{ secrets.GITHUB_TOKEN }}
draft: false
prerelease: false
97 changes: 97 additions & 0 deletions .github/workflows/build_macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: Build Macos

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
UPLOAD_BIN_FILE: true

jobs:

build:
name: Build
strategy:
matrix:
go-version: [ 1.19.x ]
platform: [ macos-latest ]
arch: [ 386, amd64 ]
runs-on: ${{ matrix.platform }}
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}

- name: Build ${{ matrix.platform }} ${{ matrix.arch }} with Go
if: (matrix.platform == 'ubuntu-latest' || matrix.platform == 'macos-latest') && matrix.arch == 'amd64' && env.UPLOAD_BIN_FILE
id: build_linux_amd64
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
go mod tidy
export GOARCH=${{ matrix.arch }}
export CGO_ENABLED=1
echo "FATENAME=fate_$(go env GOOS)_$(go env GOARCH)" >> $GITHUB_ENV
echo "$(go env GOOS) $(go env GOARCH)"

echo "building"
go build -o fate_$(go env GOOS)_$(go env GOARCH) -v ./cmd/console

echo "compress"
tar -zcvf fate_$(go env GOOS)_$(go env GOARCH).tar.gz ./fate_$(go env GOOS)_$(go env GOARCH)

- name: Build ${{ matrix.platform }} ${{ matrix.arch }} with Go
if: matrix.platform == 'ubuntu-latest' && matrix.arch == '386' && env.UPLOAD_BIN_FILE
id: build_linux_386
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
go mod tidy
export GOARCH=${{ matrix.arch }}
export CGO_ENABLED=1
sudo apt-get install -y gcc-i686-linux-gnu g++-i686-linux-gnu
export AR="/usr/bin/i686-linux-gnu-ar -m32"
export CXX="/usr/bin/i686-linux-gnu-cpp -m32"
export CC="/usr/bin/i686-linux-gnu-gcc -m32"
echo "FATENAME=fate_$(go env GOOS)_$(go env GOARCH)" >> $GITHUB_ENV
echo "$(go env GOOS) $(go env GOARCH)"

echo "building"
go build -o fate_$(go env GOOS)_$(go env GOARCH) -v ./cmd/console

echo "compress"
tar -zcvf fate_$(go env GOOS)_$(go env GOARCH).tar.gz ./fate_$(go env GOOS)_$(go env GOARCH)

- name: Upload Linux
uses: actions/upload-artifact@master
if: (matrix.platform == 'ubuntu-latest' || matrix.platform == 'macos-latest') && env.UPLOAD_BIN_FILE
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
with:
name: ${{ env.FATENAME }}.tar.gz
path: ${{ env.FATENAME }}.tar.gz

- name: Create Release
id: create_release_linux
if: (matrix.platform == 'ubuntu-latest' || matrix.platform == 'macos-latest') && env.UPLOAD_BIN_FILE
uses: ncipollo/release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
with:
artifacts: "${{ env.FATENAME }}.tar.gz"
allowUpdates: true
commit: master
tag: auto_build
body: |
This is only a latest build from master
**Version: https://github.com/babyname/fate/commit/${{ github.sha }}**
token: ${{ secrets.GITHUB_TOKEN }}
draft: false
prerelease: false

97 changes: 97 additions & 0 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: Build Windows

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
UPLOAD_BIN_FILE: true

jobs:

build:
name: Build
strategy:
matrix:
go-version: [ 1.19.x ]
platform: [ windows-latest ]
arch: [ 386, amd64 ]
runs-on: ${{ matrix.platform }}
steps:
- name: Cleanup pre-installed tools
if: matrix.platform != 'windows-latest'
run: |
# This is a fix for https://github.com/actions/virtual-environments/issues/1918
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"

- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}

- name: Build ${{ matrix.platform }} ${{ matrix.arch }} with Go
if: matrix.platform == 'windows-latest' && matrix.arch == 'amd64' && env.UPLOAD_BIN_FILE
id: build_windows_amd64
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
go mod tidy
set GOARCH=${{ matrix.arch }}
set CGO_ENABLED=1
echo "FATENAME=fate_windows_amd64" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "building"
go build -o fate_windows_amd64.exe -v ./cmd/console

echo "compress"
Compress-Archive -Path fate_windows_amd64.exe -DestinationPath fate_windows_amd64.zip

- name: Build ${{ matrix.platform }} ${{ matrix.arch }} with Go
if: matrix.platform == 'windows-latest' && matrix.arch == '386' && env.UPLOAD_BIN_FILE
id: build_windows_386
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
go mod tidy
set GOARCH=${{ matrix.arch }}
set CGO_ENABLED=1
echo "FATENAME=fate_windows_386" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "building"
go build -o fate_windows_386.exe -v ./cmd/console

echo "compress"
Compress-Archive -Path fate_windows_386.exe -DestinationPath fate_windows_386.zip

- name: Upload Windows
uses: actions/upload-artifact@master
if: matrix.platform == 'windows-latest' && env.UPLOAD_BIN_FILE
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
with:
name: ${{ env.FATENAME }}.zip
path: ${{ env.FATENAME }}.zip

- name: Create Release
id: create_release_windows
if: matrix.platform == 'windows-latest' && env.UPLOAD_BIN_FILE
uses: ncipollo/release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
with:
artifacts: "${{ env.FATENAME }}.zip"
allowUpdates: true
commit: master
tag: auto_build
body: |
This is only a latest build from master
**Version: https://github.com/babyname/fate/commit/${{ github.sha }}**
token: ${{ secrets.GITHUB_TOKEN }}
draft: false
prerelease: false
22 changes: 22 additions & 0 deletions .github/workflows/close-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Close inactive issues
on:
schedule:
- cron: "30 1 * * *"

jobs:
close-issues:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v3
with:
days-before-issue-stale: 180
days-before-issue-close: 360
stale-issue-label: "stale"
stale-issue-message: "This issue is stale because it has been open for 30 days with no activity."
close-issue-message: "This issue was closed because it has been inactive for 60 days since being marked as stale."
days-before-pr-stale: -1
days-before-pr-close: -1
repo-token: ${{ secrets.GITHUB_TOKEN }}
46 changes: 33 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,34 @@
# Binaries for programs and plugins
vendor/
#Ignore thumbnails created by Windows
Thumbs.db
#Ignore files built by Visual Studio
*.obj
*.exe
*.dll
*.so
*.dylib

# Test binary, build with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
.glide/
*.pdb
*.user
*.aps
*.pch
*.vspscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.bak
*.cache
*.ilk
*.log
[Bb]in
#[Dd]ebug*/
*.lib
*.sbr
obj/
[Rr]elease*/
_ReSharper*/
[Tt]est[Rr]esult*
.vs/
#Nuget packages folder
packages/
/.idea
go.sum
Loading
Loading