Skip to content

Commit 8f24eb6

Browse files
committed
init
0 parents  commit 8f24eb6

File tree

10 files changed

+400
-0
lines changed

10 files changed

+400
-0
lines changed

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# These are supported funding model platforms
2+
3+
custom: ['https://afdian.net/a/vscodev']

.github/workflows/docker-image.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Publish Docker image
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
docker:
8+
name: Push Docker image to Docker Hub
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
with:
14+
repository: ${{ secrets.GH_REPO }}
15+
token: ${{ secrets.GH_PAT }}
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: '18.x'
21+
cache: 'yarn'
22+
cache-dependency-path: web/yarn.lock
23+
24+
- name: Build frontend
25+
run: |
26+
yarn install --frozen-lockfile --non-interactive
27+
yarn quasar build
28+
cp -a dist/spa/. $GITHUB_WORKSPACE/public/dist/
29+
working-directory: ./web
30+
31+
- name: Set up QEMU
32+
uses: docker/setup-qemu-action@v3
33+
34+
- name: Set up Docker Buildx
35+
uses: docker/setup-buildx-action@v3
36+
37+
- name: Log in to Docker Hub
38+
uses: docker/login-action@v3
39+
with:
40+
username: ${{ secrets.DOCKERHUB_USERNAME }}
41+
password: ${{ secrets.DOCKERHUB_TOKEN }}
42+
43+
- name: Build and push
44+
uses: docker/build-push-action@v5
45+
with:
46+
context: .
47+
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/386,linux/arm/v6,linux/s390x
48+
push: true
49+
tags: vscodev/kikoeru:latest

.github/workflows/linux-release.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Linux Release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: write
8+
9+
env:
10+
CGO_ENABLED: 1
11+
12+
jobs:
13+
release:
14+
name: Release
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
platform:
21+
- amd64
22+
- arm64
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
with:
28+
repository: ${{ secrets.GH_REPO }}
29+
token: ${{ secrets.GH_PAT }}
30+
fetch-depth: 0
31+
32+
- name: Set up Go
33+
uses: actions/setup-go@v4
34+
with:
35+
go-version: '1.21'
36+
check-latest: true
37+
38+
- name: Setup Node.js
39+
uses: actions/setup-node@v3
40+
with:
41+
node-version: '18.x'
42+
cache: 'yarn'
43+
cache-dependency-path: web/yarn.lock
44+
45+
- name: Install dependencies for arm64
46+
if: matrix.platform == 'arm64'
47+
run: |
48+
sudo apt-get update
49+
sudo apt install gcc-aarch64-linux-gnu
50+
51+
- name: Build frontend
52+
run: |
53+
yarn install --frozen-lockfile --non-interactive
54+
yarn quasar build
55+
cp -a dist/spa/. $GITHUB_WORKSPACE/public/dist/
56+
working-directory: ./web
57+
58+
- name: Build
59+
run: |
60+
go mod download
61+
if [ "${{ matrix.platform }}" == "arm64" ]; then
62+
export CC=aarch64-linux-gnu-gcc
63+
fi
64+
GOARCH=${{ matrix.platform }} go build -ldflags '-s -w -extldflags "-static"' -o kikoeru
65+
66+
- name: Package
67+
run: |
68+
dist="kikoeru-linux-${{ matrix.platform }}"
69+
mkdir $dist
70+
cp kikoeru $dist
71+
tar zcf "$dist.tar.gz" $dist
72+
73+
- name: Publish
74+
uses: softprops/action-gh-release@v1
75+
with:
76+
name: v0.0.1
77+
tag_name: v0.0.1
78+
body: |
79+
When updating to a new version, the database schema may not be compatible, please delete `data/kikoeru.db` and re-sync works metadata.
80+
files: |
81+
kikoeru-*.*

.github/workflows/macos-release.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: macOS Release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: write
8+
9+
env:
10+
CGO_ENABLED: 1
11+
12+
jobs:
13+
release:
14+
name: Release
15+
runs-on: macos-latest
16+
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
platform:
21+
- amd64
22+
- arm64
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
with:
28+
repository: ${{ secrets.GH_REPO }}
29+
token: ${{ secrets.GH_PAT }}
30+
fetch-depth: 0
31+
32+
- name: Set up Go
33+
uses: actions/setup-go@v4
34+
with:
35+
go-version: '1.21'
36+
check-latest: true
37+
38+
- name: Setup Node.js
39+
uses: actions/setup-node@v3
40+
with:
41+
node-version: '18.x'
42+
cache: 'yarn'
43+
cache-dependency-path: web/yarn.lock
44+
45+
- name: Build frontend
46+
run: |
47+
yarn install --frozen-lockfile --non-interactive
48+
yarn quasar build
49+
cp -a dist/spa/. $GITHUB_WORKSPACE/public/dist/
50+
working-directory: ./web
51+
52+
- name: Build
53+
run: |
54+
go mod download
55+
GOARCH=${{ matrix.platform }} go build -ldflags "-s -w" -o kikoeru
56+
57+
- name: Package
58+
run: |
59+
dist="kikoeru-macos-${{ matrix.platform }}"
60+
mkdir $dist
61+
cp kikoeru $dist
62+
tar zcf "$dist.tar.gz" $dist
63+
64+
- name: Publish
65+
uses: softprops/action-gh-release@v1
66+
with:
67+
name: v0.0.1
68+
tag_name: v0.0.1
69+
body: |
70+
When updating to a new version, the database schema may not be compatible, please delete `data/kikoeru.db` and re-sync works metadata.
71+
files: |
72+
kikoeru-*.*

.github/workflows/windows-release.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Windows Release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: write
8+
9+
env:
10+
CGO_ENABLED: 1
11+
12+
jobs:
13+
release:
14+
name: Release
15+
runs-on: windows-latest
16+
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
platform:
21+
- amd64
22+
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
with:
27+
repository: ${{ secrets.GH_REPO }}
28+
token: ${{ secrets.GH_PAT }}
29+
fetch-depth: 0
30+
31+
- name: Set up Go
32+
uses: actions/setup-go@v4
33+
with:
34+
go-version: '1.21'
35+
check-latest: true
36+
37+
- name: Setup Node.js
38+
uses: actions/setup-node@v3
39+
with:
40+
node-version: '18.x'
41+
cache: 'yarn'
42+
cache-dependency-path: web/yarn.lock
43+
44+
- name: Build frontend
45+
shell: bash
46+
run: |
47+
yarn install --frozen-lockfile --non-interactive
48+
yarn quasar build
49+
cp -a dist/spa/. $GITHUB_WORKSPACE/public/dist/
50+
working-directory: ./web
51+
52+
- name: Build
53+
shell: bash
54+
run: |
55+
go mod download
56+
GOARCH=${{ matrix.platform }} go build -ldflags "-s -w" -o kikoeru.exe
57+
58+
- name: Package
59+
shell: bash
60+
run: |
61+
dist="kikoeru-windows-${{ matrix.platform }}"
62+
mkdir $dist
63+
cp kikoeru.exe $dist
64+
7z a "$dist.zip" $dist
65+
66+
- name: Publish
67+
uses: softprops/action-gh-release@v1
68+
with:
69+
name: v0.0.1
70+
tag_name: v0.0.1
71+
body: |
72+
When updating to a new version, the database schema may not be compatible, please delete `data/kikoeru.db` and re-sync works metadata.
73+
files: |
74+
kikoeru-*.*

.gitignore

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Created by .ignore support plugin (hsz.mobi)
2+
### Go template
3+
# Binaries for programs and plugins
4+
*.exe
5+
*.exe~
6+
*.dll
7+
*.so
8+
*.dylib
9+
10+
# Test binary, built with `go test -c`
11+
*.test
12+
13+
# Output of the go coverage tool, specifically when used with LiteIDE
14+
*.out
15+
16+
# Dependency directories (remove the comment below to include it)
17+
# vendor/
18+
public/dist/*
19+
!public/dist/README.md
20+
21+
# JetBrains
22+
.idea/
23+
24+
# MacOS
25+
.DS_Store
26+
.AppleDouble
27+
.LSOverride
28+
29+
# Kikoeru
30+
kikoeru
31+
kikoeru.log

0 commit comments

Comments
 (0)