Skip to content

Commit

Permalink
Initialize project
Browse files Browse the repository at this point in the history
  • Loading branch information
HexaField committed Oct 24, 2024
0 parents commit 2d29283
Show file tree
Hide file tree
Showing 8 changed files with 311 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/project-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: project-build
on: push
jobs:
secrets-gate:
runs-on: ubuntu-latest
outputs:
ok: ${{ steps.check-secrets.outputs.ok }}
steps:
- name: check for secrets needed to run workflows
id: check-secrets
run: |
if [ ${{ secrets.PROJECT_BUILD_ENABLED }} == 'true' ]; then
echo "ok=enabled" >> $GITHUB_OUTPUT
fi
compile-codebase:
needs:
- secrets-gate
if: ${{ needs.secrets-gate.outputs.ok == 'enabled' }}
runs-on: ubuntu-latest
steps:
- name: Checkout Infinite Reality Engine
uses: actions/checkout@v3
with:
repository: ir-engine/ir-engine
- name: Checkout Project
uses: actions/checkout@v3
with:
path: './packages/projects/projects/ir-engine/${{ github.event.repository.name }}'
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: restore lerna
uses: actions/cache@v3
with:
path: |
node_modules
*/*/node_modules
package-lock.json
key: ${{ runner.os }}-branch-build-${{ hashFiles('**/package.json') }}
- run: cp .env.local.default .env.local
- run: npm install --production=false --loglevel notice --legacy-peer-deps
- run: npm run lint
- run: npm run check-errors
- run: npm run dev-docker
- run: npm run dev-reinit
- run: npx lerna run --ignore '@ir-engine/*' test
- run: npm run build-client
61 changes: 61 additions & 0 deletions .github/workflows/version-increment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: version-increment

on:
release:
types: [created]

jobs:
secrets-gate:
runs-on: ubuntu-latest
outputs:
ok: ${{ steps.check-secrets.outputs.ok }}
steps:
- name: check for secrets needed to run workflows
id: check-secrets
run: |
if [ ${{ secrets.PROJECT_VERSION_INCREMENT_ENABLED }} == 'true' ]; then
echo "ok=enabled" >> $GITHUB_OUTPUT
fi
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
scope: '@ir-engine'
- name: Set git username
run: git config user.name "CI Bot"
- name: Set git email
run: git config user.email [email protected]
- name: Set pr_branch_name environment variable
run: echo pr_branch_name=version-increment-${{ github.event.release.tag_name }} >> $GITHUB_ENV
- name: Switch to branch ${{ env.pr_branch_name }}
run: git switch -c ${{ env.pr_branch_name }}
- name: NPM increment version
run: npm version ${{ github.event.release.tag_name }} --no-git-tag-version
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Move root package.json
run: mv package.json package.json.altered
- name: Install dependencies for running bump-project-versions
run: npm install [email protected] [email protected] [email protected] [email protected]
- name: Move root package.json back
run: mv package.json.altered package.json
- name: Bump default and template project version
run: node scripts/bump-project-versions.js
- name: Run git add
run: git add .
- name: Commit changes
run: git commit -m ${{ github.event.release.tag_name }}
- name: Push changes to new branch
run: git push --no-verify origin ${{ env.pr_branch_name }}
- name: Create version bump PR
uses: repo-sync/pull-request@v2
with:
destination_branch: ${{ github.event.release.target_commitish }}
github_token: ${{ secrets.GITHUB_TOKEN }}
source_branch: ${{ env.pr_branch_name }}
pr_title: ${{ github.event.release.tag_name }}
pr_body: Bump version to ${{ github.event.release.tag_name }}
112 changes: 112 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt

# Gatsby files
.cache/

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port
.buildcache

build/
dist/
**/docs/

.DS_Store

.history
.history/

index.ts.bak
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
CPAL-1.0 License

The contents of this file are subject to the Common Public Attribution License
Version 1.0. (the "License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
https://github.com/ir-engine/ir-engine/blob/dev/LICENSE.
The License is based on the Mozilla Public License Version 1.1, but Sections 14
and 15 have been added to cover use of software over a computer network and
provide for limited attribution for the Original Developer. In addition,
Exhibit A has been modified to be consistent with Exhibit B.

Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the
specific language governing rights and limitations under the License.

The Original Code is Infinite Reality Engine.

The Original Developer is the Initial Developer. The Initial Developer of the
Original Code is the Infinite Reality Engine team.

All portions of the code written by the Infinite Reality Engine team are Copyright © 2021-2023
Infinite Reality Engine. All Rights Reserved.
7 changes: 7 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "ir-engine/ir-example-item-collect",
"version": "0.0.0",
"engineVersion": "1.6.0",
"description": "The default project for iR Engine",
"thumbnail": "/static/IR_thumbnail.jpg"
}
23 changes: 23 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "ir-engine/ir-example-item-collect",
"version": "0.0.0",
"scripts": {
"test": "cross-env TEST=true vitest run",
"check-errors": "tsc --noemit",
"format": "prettier --write \"**/*.{ts,tsx}\"",
"format-scss": "stylelint \"**/*.scss\" --fix",
"format-staged": "lint-staged"
},
"license": "ISC",
"pre-commit": [
"format-staged"
],
"lint-staged": {
"*.{ts,tsx}": [
"prettier --write \"**/*.{ts,tsx}\""
],
"*.scss": [
"stylelint \"**/*.scss\" --fix"
]
}
}
3 changes: 3 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### iR Engine Project

This is an iR Engine project.
35 changes: 35 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"compilerOptions": {
"target": "ESNext",
"useDefineForClassFields": true,
"module": "CommonJS",
"lib": ["ESNext", "DOM", "DOM.Iterable"],
"skipLibCheck": true,
"moduleResolution": "node",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",
"noEmit": true,
"allowJs": true,
"forceConsistentCasingInFileNames": true,
"strict": false,
"strictNullChecks": true,
"strictBindCallApply": true,
"noImplicitAny": false,
"resolveJsonModule": true,
"esModuleInterop": true,
"sourceMap": true,
"jsx": "react",
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"emitDecoratorMetadata": true,
"declaration": false,
"types": ["@types/node"]
},
"include": [
"../../../../../__global.d.ts",
"../../../../client-core/src/",
"../../../../server-core/src/",
"./src"
]
}

0 comments on commit 2d29283

Please sign in to comment.