diff --git a/.github/workflows/HtmlCI.yml b/.github/workflows/HtmlCI.yml new file mode 100644 index 0000000..5e9b9e4 --- /dev/null +++ b/.github/workflows/HtmlCI.yml @@ -0,0 +1,22 @@ +name: HtmlCI +on: [push, pull_request] +jobs: + build: + runs-on: ubuntu-latest + if: ${{ !contains(github.event.head_commit.message, '[ci skip]') }} + steps: + - uses: actions/checkout@v4 + - name: Html-CreadorCraft-Maker + uses: ./ + with: + path: './test' + pathGame: "./Test.html" + - name: CreadorCraft-Maker + uses: Creadores-Program/CreadorCraft-Maker-GHA@v1.1.0 + with: + path: "./test" + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: My Game + path: gameBuildCCM/TestName 1.0.0.creadorcraftgame.zip diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index b943c35..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: NodejsCI -on: [push, pull_request] -jobs: - build: - runs-on: ubuntu-latest - if: ${{ !contains(github.event.head_commit.message, '[ci skip]') }} - steps: - - uses: actions/checkout@v4 - - name: CreadorCraft-Maker - uses: ./ - with: - path: './test' diff --git a/README.md b/README.md index e36e895..51aef92 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# CreadorCraft-Maker-GHA +# Html to CreadorCraft Maker GHA   @@ -7,13 +7,20 @@   -Github Action to package your CreatorCraft game! - -You can now package your CreatorCraft game on Github! +Github Action to transpile your Html5 game to CreatorCraft game on Github! If you want to know how to create a game in CreadorCraft I recommend you check out the [CreadorCraft Maker wiki](https://creadorcraft-maker.blogspot.com/p/documentacionwiki.html) you can also run many programming languages for your game! ## Example Work +You need a Html5 game file .html +### Action options +- path: destination of the game files CreatorCraft (the game's manifest.json should be there when creating) required +- pathGame: Html5 game directory if it is in your Github repo +- pathCustomJs: additional JavaScript file directory for the Html5 game (must be in a different directory than where the CraftCreator game will be generated, same for the css) +- pathCustomCSS: additional css to the Html5 game + +### Example of task: + ```yml name: CI @@ -25,6 +32,12 @@ jobs: if: ${{ !contains(github.event.head_commit.message, '[ci skip]') }} steps: - uses: actions/checkout@v4 + - name: Scratch-CreadorCraft-Maker + uses: Creadores-Program/Html-to-CreadorCraft-Maker-GHA@v1.0.0 + with: + path: "./src" # Destinity CreadorCraft Game (this not genere manifest.json) + pathGame: "./Game.html" + # Pack.. - name: CreadorCraft-Maker uses: Creadores-Program/CreadorCraft-Maker-GHA@v1.1.0 with: @@ -37,7 +50,10 @@ jobs: ``` ### Structure Repo: -myName/RepoGameName/src +myName/RepoGameName/ +- Game.html + +- src - manifest.json: ```json @@ -45,16 +61,13 @@ myName/RepoGameName/src "name": "TestName", "description": "Test game", "version": "1.0.0", - "mainHtml": "index.html",//dir main html file + "mainHtml": "index.html", "mainCSS": "index.css", - "mainJS": "index.js" + "mainJS": "main.js" } ``` - - index.html - - index.css - - index.js -more info in Wiki! +[CreadorCraft Maker Action](https://github.com/marketplace/actions/creadorcraft-maker) Made in Mexico. diff --git a/Test.html b/Test.html new file mode 100644 index 0000000..ebe0ebd --- /dev/null +++ b/Test.html @@ -0,0 +1,12 @@ + + +
Hola Mundo!
+ + + diff --git a/action.yml b/action.yml index 5448652..1eb8b14 100644 --- a/action.yml +++ b/action.yml @@ -1,10 +1,19 @@ -name: "CreadorCraft-Maker" +name: "Html-CreadorCraft-Maker" author: "Creadores Program" -description: "Github Action to package your CreadorCraft game!" +description: "Github Action to package your Html5 game to CreatorCraft game!" inputs: path: - description: "directory where the game to be packaged is" + description: "destination directory for the generated game" required: true + pathGame: + description: "Html game directory" + required: true + pathCustomJs: + description: "Custom js for Game" + required: false + pathCustomCSS: + description: "Custom css for Game" + required: false runs: using: "node20" main: "index.js" diff --git a/game.html b/game.html new file mode 100644 index 0000000..55cee24 --- /dev/null +++ b/game.html @@ -0,0 +1,363 @@ + + + + + + + + +