Skip to content
Merged

Dev #120

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .env.temp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
AUTH0_DOMAIN={Your Auth0 domain}.auth0.com
AUTH0_CLIENT_ID={Your Auth0 client id}
AUTH0_CLIENT_SECRET={Your Auth0 secret}

AZURE_BLOB_CONNECTION_STRING=DefaultEndpointsProtocol=https;AccountName={Your azure blob storage connection string}
36 changes: 36 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# SharpEngine Pipelines

## Pull Request pipelines



## Deployment Pipelines

SharpEngine consists of 5 different deployment pipelines:
- Publish Core
- Publish Asset Store
- Publish Web
- Publish Docs
- Publish Launcher

All of these pipelines are responsible of building and exposing the respective components of the system.

### Publish Core
The `publish-core.yml` creates a zip file of the engine and adds a tag to github and the zip to the releases section. That tag is also added for the commit that it was built off. If a tag for the commit this is being run-off is already found, we don't want to create another copy of the essentially the same version so we skip it.

### Publish Asset Store
The `publish-asset-store.yml` is responsible of deploying the Asset Store web interface, API and Database into Azure.

All Asset Store's resources can be found under the `rg-asset-store` resource group.
TODO: Enable from selected access ips

### Publish Web
The `publish-web.yml` is responsible of (similarly to the Asset Store) deploying the SharpEngine web interface, API and Database into Azure.

All SharpEngine Web's resources can be found under the `rg-sharpengine-web` resource group.

### Publish Docs
The `publish-docs.yml` deploys the documentation files under the ´./docs´ in the root of the repository into the `docs.sharpengine.com` site.

### Publish Launcher
The ``
17 changes: 12 additions & 5 deletions .github/workflows/azure-static-web-apps-white-sky-0acd4ad03.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
name: Azure Static Web Apps CI/CD
name: Publish Asset Store

on:
push:
branches:
- main
# - main
- feature/52-av-web
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- main
# - main
- feature/52-av-web

jobs:
build_and_deploy_job:
Expand All @@ -22,8 +24,10 @@ jobs:
with:
submodules: true
lfs: false

- name: Install OIDC Client from Core Package
run: npm install @actions/core@1.6.0 @actions/http-client

- name: Get Id Token
uses: actions/github-script@v6
id: idtoken
Expand All @@ -32,6 +36,7 @@ jobs:
const coredemo = require('@actions/core')
return await coredemo.getIDToken()
result-encoding: string

- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
Expand All @@ -40,10 +45,11 @@ jobs:
action: "upload"
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "/Asset Store/asset-store-ui" # App source code path
app_location: "/AssetStore/asset-store-ui" # App source code path
api_location: "" # Api source code path - optional
output_location: "/Asset Store/asset-store-ui/build" # Built app content directory - optional
# output_location: "app" # Built app content directory - optional
github_id_token: ${{ steps.idtoken.outputs.result }}
app_build_command: "CI=false npm run build"
###### End of Repository/Build Configurations ######

close_pull_request_job:
Expand All @@ -56,3 +62,4 @@ jobs:
uses: Azure/static-web-apps-deploy@v1
with:
action: "close"

16 changes: 16 additions & 0 deletions .github/workflows/publish-asset-store.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Publish Asset Store _ Temp

on:
push:
branches:
- test
pull_request:
branches:
- test

jobs:
echo:
runs-on: ubuntu-latest
steps:
- name: Echo message
run: echo "Hello from the test branch 👋"
Comment on lines +13 to +16

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

Copilot Autofix

AI 10 months ago

To fix the problem, an explicit permissions block should be added to the workflow, limiting the permissions of the automatically provided GITHUB_TOKEN. The most restrictive option—unless a specific permission is required—is permissions: {} at the workflow root or at the relevant job level (here, the entire workflow only echoes a message and does not require any permissions). Place the new permissions block at the root, just after the namekey and before theon` key, to apply to all jobs by default. No additional imports, methods, or code are required beyond the insertion of this YAML block.


Suggested changeset 1
.github/workflows/publish-asset-store.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/publish-asset-store.yml b/.github/workflows/publish-asset-store.yml
--- a/.github/workflows/publish-asset-store.yml
+++ b/.github/workflows/publish-asset-store.yml
@@ -1,4 +1,5 @@
 name: Publish Asset Store _ Temp
+permissions: {}
 
 on:
   push:
EOF
@@ -1,4 +1,5 @@
name: Publish Asset Store _ Temp
permissions: {}

on:
push:
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
2 changes: 1 addition & 1 deletion .github/workflows/publish-core.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish NuGet Package
name: Publish Core

on:
push:
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Publish Docs

on:
push:
branches:
- test
pull_request:
branches:
- test

jobs:
echo:
runs-on: ubuntu-latest
steps:
- name: Echo message
run: echo "Hello from the test branch 👋"
Comment on lines +13 to +16

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

Copilot Autofix

AI 10 months ago

To fix the problem, add an explicit permissions block to the workflow, restricting the GitHub token to the minimal permission required. In this specific workflow, the only job (echo) just runs a shell command to print a message and does not require any permissions to access repository contents or perform actions with the GitHub token.

The best-practice fix is to set permissions: {} (which is equivalent to disabling all permissions) at the workflow/root level, immediately after the name: declaration and before the on: trigger. This ensures that all jobs in the workflow get no token permissions by default. No code or functionality will be changed by this update, and no additional imports, packages, or code changes are necessary.

Edit .github/workflows/publish-docs.yml:

  • Insert a permissions: {} block after the workflow name at line 2.

Suggested changeset 1
.github/workflows/publish-docs.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml
--- a/.github/workflows/publish-docs.yml
+++ b/.github/workflows/publish-docs.yml
@@ -1,4 +1,5 @@
 name: Publish Docs
+permissions: {}
 
 on:
   push:
EOF
@@ -1,4 +1,5 @@
name: Publish Docs
permissions: {}

on:
push:
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
16 changes: 16 additions & 0 deletions .github/workflows/publish-launcher.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Publish Launcher

on:
push:
branches:
- test
pull_request:
branches:
- test

jobs:
echo:
runs-on: ubuntu-latest
steps:
- name: Echo message
run: echo "Hello from the test branch 👋"
Comment on lines +13 to +16

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

Copilot Autofix

AI 10 months ago

To fix this problem, explicitly declare a permissions block in your workflow YAML. Since the shown publish-launcher.yml workflow simply runs an echo command and does not appear to need any repository access, the most restrictive permissions, i.e., permissions: {} (no permissions), can be safely used. You can add this at the root of the workflow to apply to all jobs, or specifically within the echo job if desired. The most standard approach is to place it at the workflow root, immediately after the name key.

This involves editing .github/workflows/publish-launcher.yml by adding the following lines after the name property:

permissions: {}

No dependencies, imports, or further code changes are required.


Suggested changeset 1
.github/workflows/publish-launcher.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/publish-launcher.yml b/.github/workflows/publish-launcher.yml
--- a/.github/workflows/publish-launcher.yml
+++ b/.github/workflows/publish-launcher.yml
@@ -1,4 +1,5 @@
 name: Publish Launcher
+permissions: {}
 
 on:
   push:
EOF
@@ -1,4 +1,5 @@
name: Publish Launcher
permissions: {}

on:
push:
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
16 changes: 16 additions & 0 deletions .github/workflows/publish-web.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Publish Web

on:
push:
branches:
- test
pull_request:
branches:
- test

jobs:
echo:
runs-on: ubuntu-latest
steps:
- name: Echo message
run: echo "Hello from the test branch 👋"
Comment thread Dismissed
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -262,3 +262,5 @@ __pycache__/

# Registry file for setting the .sharpengine file type
/Editor/shortcut.reg

.env
36 changes: 0 additions & 36 deletions Asset Store/AssetStore.Database/Models/Asset.cs

This file was deleted.

14 changes: 0 additions & 14 deletions Asset Store/AssetStore.Database/Models/Comment.cs

This file was deleted.

112 changes: 0 additions & 112 deletions Asset Store/AssetStore/Controllers/AssetController.cs

This file was deleted.

30 changes: 0 additions & 30 deletions Asset Store/AssetStore/Controllers/CommentController.cs

This file was deleted.

17 changes: 0 additions & 17 deletions Asset Store/AssetStore/Services/Asset/IAssetService.cs

This file was deleted.

Empty file removed Asset Store/Directory.Build.props
Empty file.
Empty file.
Loading