Skip to content

Commit

Permalink
toolbox is not an app
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-codes committed Nov 21, 2023
1 parent 235b812 commit 168ad58
Show file tree
Hide file tree
Showing 593 changed files with 110 additions and 59 deletions.
2 changes: 2 additions & 0 deletions .devcontainer/post-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ set -e
cd "$(dirname "${BASH_SOURCE[0]}")"

mkdir -p ../.mongodb/data

git lfs install
10 changes: 5 additions & 5 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/.yarn/** linguist-vendored
/.yarn/releases/* binary
/.yarn/plugins/**/* binary
/.pnp.* binary linguist-generated
apps/playnite-action-runner/src/Toolbox/libcef.dll filter=lfs diff=lfs merge=lfs -text
/.yarn/** linguist-vendored
/.yarn/releases/* binary
/.yarn/plugins/**/* binary
/.pnp.* binary linguist-generated
**/libcef.dll filter=lfs diff=lfs merge=lfs -text
83 changes: 77 additions & 6 deletions .github/workflows/pull-request-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
- main

jobs:
unit_tests:
name: Verify PR - Tests
unit_tests_linux:
name: Verify PR - Tests (Linxu)
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
Expand All @@ -32,10 +32,40 @@ jobs:
ONEPASSWORD_SERVER_URL: ${{ secrets.ONEPASSWORD_SERVER_URL }}
ONEPASSWORD_VAULT_ID: ${{ secrets.ONEPASSWORD_VAULT_ID }}
- name: Run all unit tests
run: yarn nx run-many --target=test/unit --all --parallel --verbose --exclude=playnite-web-extension
run: yarn nx run-many --target=test/unit --parallel --verbose --tags=linux

package:
name: Package
unit_tests_windows:
name: Verify PR - Tests (Windows)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Read .nvmrc
run: echo "##[set-output name=NODE_VERSION;]$(cat package.json | jq .engines.node | sed -e 's/"//g' | sed -e 's/>=//g')"
id: nvm
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "${{ steps.nvm.outputs.NODE_VERSION }}"
- uses: actions/setup-dotnet@v2
with:
dotnet-version: "8.0.100"
- name: Enable yarn
run: corepack enable && corepack prepare --activate yarn@^4.0.0
- name: Install deps
run: yarn
- name: Prepare
run: yarn nx run-many --target=prepare --parallel --all --verbose
env:
ONEPASSWORD_TOKEN: ${{ secrets.ONEPASSWORD_TOKEN }}
ONEPASSWORD_SERVER_URL: ${{ secrets.ONEPASSWORD_SERVER_URL }}
ONEPASSWORD_VAULT_ID: ${{ secrets.ONEPASSWORD_VAULT_ID }}
- name: Run all unit tests
run: yarn nx run-many --target=test/unit --parallel --verbose --tags=linux

package_linux:
name: Package (Linux)
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
Expand All @@ -61,7 +91,48 @@ jobs:
ONEPASSWORD_VAULT_ID: ${{ secrets.ONEPASSWORD_VAULT_ID }}

- name: Package apps
run: yarn nx affected --target=package --parallel --base=HEAD~ --head=HEAD --verbose --exclude=playnite-web-extension,playnite-action-runner
run: yarn nx affected --target=package --parallel --base=HEAD~ --head=HEAD --verbose --tags=linux
env:
ONEPASSWORD_TOKEN: ${{ secrets.ONEPASSWORD_TOKEN }}
ONEPASSWORD_SERVER_URL: ${{ secrets.ONEPASSWORD_SERVER_URL }}
ONEPASSWORD_VAULT_ID: ${{ secrets.ONEPASSWORD_VAULT_ID }}
NODE_ENV: production
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: packaged-apps
path: apps/*/.packaged

package_windows:
name: Package (Windows)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Read .nvmrc
run: echo "##[set-output name=NODE_VERSION;]$(cat package.json | jq .engines.node | sed -e 's/"//g' | sed -e 's/>=//g')"
id: nvm
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "${{ steps.nvm.outputs.NODE_VERSION }}"
- uses: actions/setup-dotnet@v2
with:
dotnet-version: "8.0.100"
- name: Enable yarn
run: corepack enable && corepack prepare --activate yarn@^4.0.0
- name: Install deps
run: yarn
- name: Prepare
run: yarn nx run-many --target=prepare --parallel --all --verbose
env:
ONEPASSWORD_TOKEN: ${{ secrets.ONEPASSWORD_TOKEN }}
ONEPASSWORD_SERVER_URL: ${{ secrets.ONEPASSWORD_SERVER_URL }}
ONEPASSWORD_VAULT_ID: ${{ secrets.ONEPASSWORD_VAULT_ID }}

- name: Package apps
run: yarn nx affected --target=package --parallel --base=HEAD~ --head=HEAD --verbose --tags=linux
env:
ONEPASSWORD_TOKEN: ${{ secrets.ONEPASSWORD_TOKEN }}
ONEPASSWORD_SERVER_URL: ${{ secrets.ONEPASSWORD_SERVER_URL }}
Expand Down
9 changes: 0 additions & 9 deletions apps/playnite-action-runner/package.json

This file was deleted.

35 changes: 0 additions & 35 deletions apps/playnite-action-runner/project.json

This file was deleted.

3 changes: 0 additions & 3 deletions apps/playnite-action-runner/src/Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion apps/playnite-web-extension/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@
}
}
},
"tags": [],
"tags": ["windows"],
"implicitDependencies": []
}
9 changes: 9 additions & 0 deletions libs/build-utils/playnite-toolbox/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "playnite-toolbox",
"description": "Playnite Toolbox.exe to package extensions via Github Actions.",
"version": "0.0.1",
"private": true,
"devDependencies": {
"nx": "^17.1.2"
}
}
16 changes: 16 additions & 0 deletions libs/build-utils/playnite-toolbox/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "playnite-toolbox",
"sourceRoot": "libs/build-utils/playnite-toolbox/src",
"projectType": "library",
"targets": {
"run": {
"executor": "nx:run-commands",
"options": {
"command": "./src/Toolbox/Toolbox.exe",
"cwd": "{projectRoot}"
}
}
},
"tags": [],
"implicitDependencies": []
}
Loading

0 comments on commit 168ad58

Please sign in to comment.