-
Notifications
You must be signed in to change notification settings - Fork 0
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 21796d9
Showing
94 changed files
with
2,928 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,34 @@ | ||
name: Build Client | ||
on: | ||
push: | ||
branches: [master] | ||
paths: | ||
- app/client/** | ||
pull_request: | ||
paths: | ||
- app/client/** | ||
|
||
jobs: | ||
client-build: | ||
name: "Build Client" | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
sparse-checkout: "app/client" | ||
sparse-checkout-cone-mode: false | ||
|
||
- name: Install Node.js, NPM and Yarn | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 20.x | ||
|
||
- name: Install dependencies | ||
working-directory: ./app/client | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Build | ||
working-directory: ./app/client | ||
run: yarn run build |
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,29 @@ | ||
name: Prettier Check | ||
on: | ||
push: | ||
branches: [master] | ||
paths: | ||
- app/server/** | ||
- app/client/** | ||
pull_request: | ||
paths: | ||
- app/server/** | ||
- app/client/** | ||
|
||
jobs: | ||
prettier: | ||
name: "Checking code style" | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Node.js, NPM and Yarn | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 20.x | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Run Prettier check | ||
run: npm run prettier:check |
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,115 @@ | ||
name: Publish | ||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
jobs: | ||
client-build: | ||
name: "Build Client" | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
sparse-checkout: "app/client" | ||
sparse-checkout-cone-mode: false | ||
|
||
- name: Install Node.js, NPM and Yarn | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 20.x | ||
|
||
- name: Set Versions | ||
uses: actions/github-script@v4 | ||
id: set_version | ||
with: | ||
script: | | ||
const tag = context.ref.substring(10).replace('v', '') | ||
core.setOutput('tag', tag) | ||
core.setOutput('version', tag.split("-")[0]) | ||
- name: Add version to package.json | ||
uses: jaywcjlove/github-action-package@main | ||
with: | ||
path: "./app/client/package.json" | ||
data: | | ||
{ | ||
"version": "${{ steps.set_version.outputs.tag }}" | ||
} | ||
- name: Install dependencies | ||
working-directory: ./app/client | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Build | ||
working-directory: ./app/client | ||
run: yarn run build | ||
|
||
- name: "Upload Artifact" | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: client-build | ||
path: "./app/client/build" | ||
|
||
server-build: | ||
name: "Build Server" | ||
|
||
needs: [client-build] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
os: [darwin, linux] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
sparse-checkout: "app/server" | ||
sparse-checkout-cone-mode: false | ||
|
||
- uses: denoland/setup-deno@v1 | ||
with: | ||
deno-version: vx.x.x | ||
|
||
- name: Set Versions | ||
uses: actions/github-script@v4 | ||
id: set_version | ||
with: | ||
script: | | ||
const tag = context.ref.substring(10).replace('v', '') | ||
core.setOutput('tag', tag) | ||
core.setOutput('version', tag.split("-")[0]) | ||
- name: Replace consts.ts version | ||
uses: richardrigutins/replace-in-files@v2 | ||
with: | ||
files: "./app/server/mod.ts" | ||
search-text: "__VERSION__" | ||
replacement-text: ${{ steps.set_version.outputs.tag }} | ||
|
||
- name: Download client-build artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: client-build | ||
path: ./app/server | ||
|
||
- name: Build index | ||
working-directory: ./app/server | ||
run: deno task build:index | ||
|
||
- name: Compile | ||
working-directory: ./app/server | ||
run: deno task compile:${{ matrix.os }} | ||
|
||
- name: "Upload to release" | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: ./build/assets_editor_${{ matrix.os }} | ||
tag: ${{ github.ref }} | ||
overwrite: true | ||
file_glob: true |
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,29 @@ | ||
name: Build Auth | ||
on: | ||
push: | ||
branches: [master] | ||
paths: | ||
- app/server/** | ||
pull_request: | ||
paths: | ||
- app/server/** | ||
|
||
jobs: | ||
auth-build: | ||
name: "Build Server" | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
sparse-checkout: "app/server" | ||
sparse-checkout-cone-mode: false | ||
|
||
- uses: denoland/setup-deno@v1 | ||
with: | ||
deno-version: vx.x.x | ||
|
||
- name: Build | ||
working-directory: ./app/server | ||
run: deno task build |
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,2 @@ | ||
/node_modules | ||
.idea |
Oops, something went wrong.