-
Notifications
You must be signed in to change notification settings - Fork 3
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
1 parent
bf261c6
commit fbcca77
Showing
116 changed files
with
12,021 additions
and
14,553 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,14 @@ | ||
# Stop the editor from looking for .editorconfig files in the parent directories | ||
# root = true | ||
|
||
[*] | ||
|
||
# Non-configurable Prettier behaviors | ||
charset = utf-8 | ||
insert_final_newline = true | ||
|
||
# Configurable Prettier behaviors | ||
end_of_line = lf | ||
indent_style = space | ||
indent_size = 2 | ||
max_line_length = 120 |
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,17 @@ | ||
changelog: | ||
categories: | ||
- title: 仙劍奇俠傳 | ||
labels: | ||
- "Component: PAL" | ||
|
||
- title: 新仙劍奇俠傳 | ||
labels: | ||
- "Component: PAL-New" | ||
|
||
- title: 軒轅劍外傳 - 楓之舞 | ||
labels: | ||
- "Component: SWD-2E" | ||
|
||
- title: Other Changes | ||
labels: | ||
- "*" |
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 |
---|---|---|
@@ -1,47 +1,45 @@ | ||
name: Build | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-and-test: | ||
check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v3 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 14.x | ||
node-version: 20 | ||
|
||
- id: yarn-cache-dir-path | ||
name: Get yarn cache directory path | ||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | ||
- name: Install dependencies | ||
run: npm install | ||
|
||
- id: yarn-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Check the code format | ||
run: npm run fmt-check | ||
|
||
- name: Show yarn version | ||
run: yarn --version | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
- name: Check ESLint | ||
run: npm run lint | ||
|
||
- name: Build | ||
run: yarn build | ||
run: npm run build | ||
|
||
- name: Run linter | ||
run: yarn lint | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Run tests | ||
run: yarn test --coverage | ||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Upload coverage to Codecov | ||
run: bash <(curl -s https://codecov.io/bash) | ||
- name: Run the tests | ||
run: npm run test -- --coverage |
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: Deploy | ||
|
||
on: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
inputs: | ||
overwrite-production: | ||
type: boolean | ||
required: false | ||
description: Overwrite the root folder | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Select ref | ||
id: ref-selector | ||
run: | | ||
if [[ '${{ inputs.overwrite-production }}' == "true" ]]; then | ||
echo 'ref=${{ github.sha }}' >> "$GITHUB_OUTPUT" | ||
exit 0 | ||
fi | ||
ref=$(gh release list --json name --exclude-drafts --exclude-pre-releases --limit 1 | jq -r '.[].name') | ||
if [[ -z "$ref" ]]; then | ||
echo "ref=main" >> "$GITHUB_OUTPUT" | ||
else | ||
echo "ref=$ref" >> "$GITHUB_OUTPUT" | ||
fi | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ steps.ref-selector.outputs.ref }} | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build | ||
run: npm run build -- --base=/pal-save-editor/ | ||
env: | ||
VITE_RETRO_VERSION: ${{ steps.ref-selector.outputs.ref }} | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: build | ||
path: ./dist | ||
|
||
build-preview: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build | ||
run: | | ||
sha=${{ github.sha }} | ||
export VITE_RETRO_VERSION=${sha::7} | ||
npm run build -- --base=/pal-save-editor/preview/ | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: build-preview | ||
path: ./dist | ||
|
||
merge-builds: | ||
needs: [build, build-preview] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: build | ||
path: ./dist | ||
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: build-preview | ||
path: ./dist/preview | ||
|
||
- name: Debug | ||
run: tree . | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: "dist" | ||
|
||
deploy: | ||
needs: merge-builds | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- id: deployment | ||
uses: actions/deploy-pages@v4 |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.