cicd/updating-of-manifest-info (#11)

Der PR behebt Naming Probleme und ermöglicht, dass Bauen von Versionen des Systems in der Art und Weise, dass FoundryVTT das erzeugte Paket auch versteht und mit umgehen kann.

---

Um ein Release zu bauen, muss lediglich unter dem Reiter Releases ein neuer Tag und der Quellbranch angegeben werden, nachdem der Build Runner durchgelaufen ist, werden an dem Release zwei weitere Dateien gehängt: Die Distributionsfähige Zip Datei sowie die dazugehörige Manifest Datei.

Co-authored-by: macniel <yuna.baehr@proton.me>
Reviewed-on: #11
pull/12/head
macniel 2025-09-25 18:36:12 +02:00
parent 3c0db3df50
commit dd23f4e4b6
10 changed files with 194 additions and 964 deletions

View File

@ -1,19 +0,0 @@
name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on: [push]
jobs:
Explore-Gitea-Actions:
runs-on: node-01
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
- name: Check out repository code
uses: actions/checkout@v4
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- name: List files in the repository
run: |
ls ${{ gitea.workspace }}
- run: echo "🍏 This job's status is ${{ job.status }}."

View File

@ -0,0 +1,28 @@
name: Pull Request Check
run-name: ${{ gitea.actor }} is updating the pull request 🚀
on:
pull_request:
types: [synchronize]
jobs:
testing:
runs-on: node-01
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18' # Specify the Node.js version you need
- name: Install dependencies
run: npm install
- name: Run tests
run: npm test
- name: Build project
env:
VERSION: ${{github.ref_name}}
run: npm run build

View File

@ -8,6 +8,11 @@ jobs:
build:
runs-on: node-01
steps:
- name: Print Tag
run: |
echo ${{github.ref_name}}
echo ${GITHUB_REF##*/}
- name: Checkout code
uses: actions/checkout@v2
@ -23,6 +28,8 @@ jobs:
run: npm test
- name: Build project
env:
VERSION: ${{github.ref_name}}
run: npm run build
- name: Package build output
@ -30,6 +37,7 @@ jobs:
cd ./dist
zip -r release.zip . # Adjust the path to your build output directory
mv release.zip /tmp/release.zip
- name: Package Upload
uses: akkuman/gitea-release-action@v1
with:

View File

@ -1,5 +1,6 @@
const { src, dest, series } = require('gulp');
const process = require('node:process');
const replace = require('gulp-replace');
const sass = require('gulp-sass')(require('sass'));
function buildStyles() {
@ -13,7 +14,14 @@ function copySource() {
.pipe(dest('dist/'));
}
function updateManifestFile() {
return src('dist/system.json')
.pipe(replace('{{VERSION}}', process.env.VERSION))
.pipe(dest('dist/'))
}
exports.default = series(
copySource,
buildStyles
)
buildStyles,
updateManifestFile
)

1018
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -13,6 +13,7 @@
},
"devDependencies": {
"gulp": "^5.0.1",
"gulp-replace": "^1.1.4",
"gulp-sass": "^6.0.1",
"sass": "^1.93.2",
"sass-build": "^1.1.6"

View File

3
src/main.mjs 100644
View File

@ -0,0 +1,3 @@
Hooks.once("init", () => {
console.log("DSA 4.1 is ready for development!")
})

View File

@ -1,8 +1,8 @@
{
"id": "DSA 4.1",
"id": "DSA_4-1",
"title": "Das Schwarze Auge 4.1",
"description": "Noch ein Spielsystem für Das Schwarze Auge 4.1",
"version": "0.0.1",
"version": "{{VERSION}}",
"compatibility": {
"minimum": 12,
"verified": 13
@ -15,7 +15,7 @@
"name": "macniel"
}],
"esmodules": ["main.mjs"],
"styles": ["styles/styles.css"],
"styles": ["style/styles.css"],
"packs": [{
"name": "talente",
"label": "Basistalente",
@ -39,6 +39,9 @@
"path": "lang/de.json"
}],
"documentTypes": {
"Actor": {
"character": {}
}
},
"socket": false,
"initiative": "1d6",
@ -49,6 +52,6 @@
"primaryTokenAttribute": "resources.sp",
"secondaryTokenAttribute": "resources.aus",
"url": "https://git.macniel.online/macniel/foundry-dsa41-game",
"manifest": "https://git.macniel.online/macniel/foundry-dsa41-game/system.json",
"download": ""
"manifest": "https://git.macniel.online/macniel/foundry-dsa41-game/releases/download/{{VERSION}}/system.json",
"download": "https://git.macniel.online/macniel/foundry-dsa41-game/releases/download/{{VERSION}}/release.zip"
}

View File

@ -1,54 +0,0 @@
{
"id": "DSA 4.1",
"title": "Das Schwarze Auge 4.1",
"description": "Noch ein Spielsystem für Das Schwarze Auge 4.1",
"version": "0.0.1",
"compatibility": {
"minimum": 12,
"verified": 13
},
"authors": [{
"name": "GrandpaPoppy"
},{
"name": "ParanoidSpectre"
},{
"name": "macniel"
}],
"esmodules": ["main.mjs"],
"styles": ["styles/styles.css"],
"packs": [{
"name": "talente",
"label": "Basistalente",
"type": "Item"
},{
"name": "zauber",
"label": "Basiszauber",
"type": "Item"
},{
"name": "liturgien",
"label": "Basisliturgien",
"type": "Item"
},{
"name": "sonderfertigkeiten",
"label": "Basissonderfertigkeiten",
"type": "Item"
}],
"languages": [{
"lang": "de",
"name": "Deutsch",
"path": "lang/de.json"
}],
"documentTypes": {
},
"socket": false,
"initiative": "1d6",
"grid": {
"distance": 10,
"units": "Schritt"
},
"primaryTokenAttribute": "resources.sp",
"secondaryTokenAttribute": "resources.aus",
"url": "https://git.macniel.online/macniel/foundry-dsa41-game",
"manifest": "https://git.macniel.online/macniel/foundry-dsa41-game/system.json",
"download": ""
}