-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Showing
5 changed files
with
68 additions
and
17 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,31 @@ | ||
name: Main CI | ||
on: [push, pull_request] | ||
jobs: | ||
build: | ||
name: Build Test | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ui | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup node environment | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 20.x | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn config get cacheFolder)" | ||
- uses: actions/cache@v2 | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install deps | ||
run: yarn --frozen-lockfile | ||
- name: Try build | ||
run: yarn 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 |
---|---|---|
|
@@ -19,13 +19,37 @@ jobs: | |
- name: Install ZIP | ||
run: sudo apt install zip | ||
|
||
- name: Install pnpm | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 9 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
cache: "pnpm" | ||
cache-dependency-path: "ui/pnpm-lock.yaml" | ||
|
||
- name: Install dependencies | ||
run: pnpm i --frozen-lockfile | ||
working-directory: ui | ||
|
||
- name: Run build | ||
run: pnpm build | ||
working-directory: ui | ||
env: | ||
CI: false | ||
|
||
- name: Bundle files | ||
run: | | ||
rm -rf ./.github ./.vscode ./.git | ||
shopt -s extglob | ||
mkdir ./${{ github.event.repository.name }} | ||
cp -r !(${{ github.event.repository.name }}) ${{ github.event.repository.name }} | ||
zip -r ./${{ github.event.repository.name }}.zip ./${{ github.event.repository.name }} | ||
mkdir -p ./temp/${{ github.event.repository.name }} | ||
mkdir -p ./temp/${{ github.event.repository.name }}/ui | ||
cp ./{README.md,LICENSE,fxmanifest.lua} ./temp/${{ github.event.repository.name }} | ||
cp -r ./{client,server} ./temp/${{ github.event.repository.name }} | ||
cp -r ./ui/public ./temp/${{ github.event.repository.name }}/ui/public | ||
cd ./temp && zip -r ../${{ github.event.repository.name }}.zip ./${{ github.event.repository.name }} | ||
- name: Get App Token | ||
uses: actions/create-github-app-token@v1 | ||
|
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.