-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b9e00ae
Showing
11 changed files
with
402 additions
and
0 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,3 @@ | ||
# These are supported funding model platforms | ||
|
||
custom: ['https://afdian.net/a/vscodev'] |
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,49 @@ | ||
name: Publish Docker image | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
docker: | ||
name: Push Docker image to Docker Hub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ secrets.GH_REPO }} | ||
token: ${{ secrets.GH_PAT }} | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.x' | ||
cache: 'yarn' | ||
cache-dependency-path: web/yarn.lock | ||
|
||
- name: Build frontend | ||
run: | | ||
yarn install --frozen-lockfile --non-interactive | ||
yarn quasar build | ||
cp -a dist/spa/. $GITHUB_WORKSPACE/public/dist/ | ||
working-directory: ./web | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/386,linux/arm/v6,linux/s390x | ||
push: true | ||
tags: vscodev/kikoeru:latest |
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,81 @@ | ||
name: Linux Release | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
|
||
env: | ||
CGO_ENABLED: 1 | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: | ||
- amd64 | ||
- arm64 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ secrets.GH_REPO }} | ||
token: ${{ secrets.GH_PAT }} | ||
fetch-depth: 0 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21' | ||
check-latest: true | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.x' | ||
cache: 'yarn' | ||
cache-dependency-path: web/yarn.lock | ||
|
||
- name: Install dependencies for arm64 | ||
if: matrix.platform == 'arm64' | ||
run: | | ||
sudo apt-get update | ||
sudo apt install gcc-aarch64-linux-gnu | ||
- name: Build frontend | ||
run: | | ||
yarn install --frozen-lockfile --non-interactive | ||
yarn quasar build | ||
cp -a dist/spa/. $GITHUB_WORKSPACE/public/dist/ | ||
working-directory: ./web | ||
|
||
- name: Build | ||
run: | | ||
go mod download | ||
if [ "${{ matrix.platform }}" == "arm64" ]; then | ||
export CC=aarch64-linux-gnu-gcc | ||
fi | ||
GOARCH=${{ matrix.platform }} go build -ldflags '-s -w -extldflags "-static"' -o kikoeru | ||
- name: Package | ||
run: | | ||
dist="kikoeru-linux-${{ matrix.platform }}" | ||
mkdir $dist | ||
cp kikoeru $dist | ||
tar zcf "$dist.tar.gz" $dist | ||
- name: Publish | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
name: v0.0.1 | ||
tag_name: v0.0.1 | ||
body: | | ||
When updating to a new version, the database schema may not be compatible, please delete `data/kikoeru.db` and re-sync works metadata. | ||
files: | | ||
kikoeru-*.* |
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,72 @@ | ||
name: macOS Release | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
|
||
env: | ||
CGO_ENABLED: 1 | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: macos-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: | ||
- amd64 | ||
- arm64 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ secrets.GH_REPO }} | ||
token: ${{ secrets.GH_PAT }} | ||
fetch-depth: 0 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21' | ||
check-latest: true | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.x' | ||
cache: 'yarn' | ||
cache-dependency-path: web/yarn.lock | ||
|
||
- name: Build frontend | ||
run: | | ||
yarn install --frozen-lockfile --non-interactive | ||
yarn quasar build | ||
cp -a dist/spa/. $GITHUB_WORKSPACE/public/dist/ | ||
working-directory: ./web | ||
|
||
- name: Build | ||
run: | | ||
go mod download | ||
GOARCH=${{ matrix.platform }} go build -ldflags "-s -w" -o kikoeru | ||
- name: Package | ||
run: | | ||
dist="kikoeru-macos-${{ matrix.platform }}" | ||
mkdir $dist | ||
cp kikoeru $dist | ||
tar zcf "$dist.tar.gz" $dist | ||
- name: Publish | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
name: v0.0.1 | ||
tag_name: v0.0.1 | ||
body: | | ||
When updating to a new version, the database schema may not be compatible, please delete `data/kikoeru.db` and re-sync works metadata. | ||
files: | | ||
kikoeru-*.* |
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,74 @@ | ||
name: Windows Release | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
|
||
env: | ||
CGO_ENABLED: 1 | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: windows-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: | ||
- amd64 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ secrets.GH_REPO }} | ||
token: ${{ secrets.GH_PAT }} | ||
fetch-depth: 0 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21' | ||
check-latest: true | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.x' | ||
cache: 'yarn' | ||
cache-dependency-path: web/yarn.lock | ||
|
||
- name: Build frontend | ||
shell: bash | ||
run: | | ||
yarn install --frozen-lockfile --non-interactive | ||
yarn quasar build | ||
cp -a dist/spa/. $GITHUB_WORKSPACE/public/dist/ | ||
working-directory: ./web | ||
|
||
- name: Build | ||
shell: bash | ||
run: | | ||
go mod download | ||
GOARCH=${{ matrix.platform }} go build -ldflags "-s -w" -o kikoeru.exe | ||
- name: Package | ||
shell: bash | ||
run: | | ||
dist="kikoeru-windows-${{ matrix.platform }}" | ||
mkdir $dist | ||
cp kikoeru.exe $dist | ||
7z a "$dist.zip" $dist | ||
- name: Publish | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
name: v0.0.1 | ||
tag_name: v0.0.1 | ||
body: | | ||
When updating to a new version, the database schema may not be compatible, please delete `data/kikoeru.db` and re-sync works metadata. | ||
files: | | ||
kikoeru-*.* |
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,31 @@ | ||
# Created by .ignore support plugin (hsz.mobi) | ||
### Go template | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
public/dist/* | ||
!public/dist/README.md | ||
|
||
# JetBrains | ||
.idea/ | ||
|
||
# MacOS | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Kikoeru | ||
kikoeru | ||
kikoeru.log |
Oops, something went wrong.