Skip to content

Commit

Permalink
Merge pull request #12195 from Roll20/feature/CSC-1652-gh-action-for-…
Browse files Browse the repository at this point in the history
…processing-custom-sheets

CSC-1536, CSC-1652: Adds GitHub Action for processing and uploading custom sheets as needed
  • Loading branch information
NorWhal committed Oct 2, 2023
2 parents defdfe9 + f5f5c1b commit 70f0e93
Show file tree
Hide file tree
Showing 42 changed files with 954 additions and 444 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/handle-sheet-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Processes changed character-sheets and updates CDN bucket and/or sheet-http database as needed

on: push

env:
NPM_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}

jobs:
deployment:
if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/master'
environment: ${{ github.ref_name == 'master' && 'production' || 'staging' }}
runs-on: ubuntu-latest
env:
CDN_SHEETS_FOLDER: ${{ vars.CDN_SHEETS_FOLDER }}
# Set job outputs to values from filter step
outputs:
sheet: ${{ steps.filter.outputs.sheet }}
sheet-json: ${{ steps.filter.outputs.sheet_files }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
# Enable listing of files matching each filter.
# Paths to files will be available in `${FILTER_NAME}_files` output variable.
# Paths will be escaped and space-delimited.
# Output is usable as command-line argument list in Linux shell
list-files: shell
filters: |
sheet:
- added|modified: '*/sheet.json'
- id: 'auth'
if: steps.filter.outputs.sheet == 'true'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.SHEET_HTTP_GCP_KEYFILE }}'
- name: 'Set up Cloud SDK'
if: steps.filter.outputs.sheet == 'true'
uses: 'google-github-actions/setup-gcloud@v1'

- name: 'Use gcloud CLI'
if: steps.filter.outputs.sheet == 'true'
run: 'gcloud info'
- uses: oven-sh/setup-bun@v1
if: steps.filter.outputs.sheet == 'true'

- run: bun install
if: steps.filter.outputs.sheet == 'true'
working-directory: contrib/sheet-pixie

# Handles when sheets have been updated individually
- run: bun run contrib/sheet-pixie/index.ts ${{ steps.filter.outputs.sheet_files }}
if: steps.filter.outputs.sheet == 'true'
env:
DEST_DIR: ${{ runner.temp }}/${{ env.CDN_SHEETS_FOLDER }}
- run: find ${{ env.DEST_DIR }} -maxdepth 1 -type d -exec sh -c 'cp -R --verbose "$(basename "{}")/translations" "{}/"' 2>/dev/null \;
if: steps.filter.outputs.sheet == 'true'
env:
DEST_DIR: ${{ runner.temp }}/${{ env.CDN_SHEETS_FOLDER }}
- run: gcloud storage rsync --project=roll20-actual ${{ runner.temp }}/${{ env.CDN_SHEETS_FOLDER }} gs://roll20-cdn/${{ env.CDN_SHEETS_FOLDER }} --cache-control='no-cache' --recursive
if: steps.filter.outputs.sheet == 'true'
env:
DEST_DIR: ${{ runner.temp }}/${{ env.CDN_SHEETS_FOLDER }}
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Forces-updates all production versions of sheets

on:
push:
tags:
- 'v*'

env:
NPM_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}

jobs:
deployment:
environment: production
runs-on: ubuntu-latest
env:
CDN_SHEETS_FOLDER: ${{ vars.CDN_SHEETS_FOLDER }}
steps:
- uses: actions/checkout@v3

- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.SHEET_HTTP_GCP_KEYFILE }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'

- name: 'Use gcloud CLI'
run: 'gcloud info'
- uses: oven-sh/setup-bun@v1

- run: bun install
working-directory: contrib/sheet-pixie

# Handles when a force-update has been requested (meaning all sheets will be re-built and deployed)
- run: make all
env:
DEST_DIR: ${{ runner.temp }}/${{ env.CDN_SHEETS_FOLDER }}
- run: find ${{ env.DEST_DIR }} -maxdepth 1 -type d -exec sh -c 'cp -R --verbose "$(basename "{}")/translations" "{}/"' 2>/dev/null \;
env:
DEST_DIR: ${{ runner.temp }}/${{ env.CDN_SHEETS_FOLDER }}
- run: gcloud storage rsync --project=roll20-actual ${{ runner.temp }}/${{ env.CDN_SHEETS_FOLDER }} gs://roll20-cdn/${{ env.CDN_SHEETS_FOLDER }} --delete-unmatched-destination-objects --cache-control='no-cache' --recursive
env:
DEST_DIR: ${{ runner.temp }}/${{ env.CDN_SHEETS_FOLDER }}
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ build/Release

# Dependency directories
node_modules/
!Shadowrun6th-German/node_modules
!Shadowrun6th-German/node_modules/jake/Makefile
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
Expand Down Expand Up @@ -84,7 +86,6 @@ out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
Expand Down Expand Up @@ -144,3 +145,9 @@ Icon
Network Trash Folder
Temporary Items
.apdisk

sync_sheets.sh

**/*/dist/*.html
**/*/dist/*.css
**/*/dist/*.json
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodejs 18.17.0
5 changes: 3 additions & 2 deletions 5eShaped/sheet.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"compendium": "dnd5e",
"instructions": "This sheet is designed for use with D&D 5th edition. It has been designed to match the layout of the D&D 5e Character Sheet.",
"patreon": "https://www.patreon.com/mlenser",
"legacy": true
}
"legacy": true,
"version": "1695962898"
}
5 changes: 3 additions & 2 deletions AgainstTheDarkMaster/sheet.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"roll20userid": "111814",
"preview": "AgainstTheDarkMaster.png",
"instructions": "Esta hoja de personaje ha sido diseñada para uso en partidas de Against The Dark Master, el juego de rol publicado por Other Selves.",
"legacy": true
}
"legacy": true,
"version": "1695979152"
}
5 changes: 3 additions & 2 deletions Band of Blades Official/sheet.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"roll20userid": "726129, 782723",
"preview": "blades.png",
"instructions": "This is the offical sheet for Band of Blades, featuring most of the content of the paper sheets. Please report issues or feature requests [here](https://github.com/joesinghaus/Band-of-Blades/issues).",
"legacy": true
}
"legacy": true,
"version": "1695969506"
}
5 changes: 3 additions & 2 deletions Band of Blades/sheet.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"roll20userid": "1197121, 782723, 726129, 693171",
"preview": "preview.png",
"instructions": "This sheet is designed to work with the Beta version of Band of Blades",
"legacy": true
}
"legacy": true,
"version": "1695969427"
}
5 changes: 3 additions & 2 deletions Blades in the Dark/sheet.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"roll20userid": "782723, 726129",
"preview": "blades.png",
"instructions": "This sheet for Blades in the Dark is designed to look similar to the paper sheets, and includes a sheet for both characters and the crew, as well as a faction status tracker.\nFor questions or bug reports, feel free to contact me on Discord (@deceptive.duality#6358) or Roll20.\n\nKorean translation by ClockworkOwl. French translation by S. Ziterman.",
"compendium":"BITD",
"legacy": true
"compendium": "BITD",
"legacy": true,
"version": "1695970697"
}
5 changes: 3 additions & 2 deletions Blades-in-the-Dark/sheet.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"roll20userid": "552705,477370,299095,843545",
"preview": "blades.png",
"instructions": "*The Insight, Prowess, and Resolve rolls are for resistance rolls. The result shown is 6 minus the corresponding attribute rating.\r*If the total dice pool for a roll is less than or equal to 0, then the roll automatically rolls 2d6 and shows the lowest roll.",
"legacy": true
}
"legacy": true,
"version": "1695970707"
}
5 changes: 3 additions & 2 deletions Call_of_Cthulhu_7th_Ed - German/sheet.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"roll20userid": "103705, 439055",
"preview": "coc_7th_ed.png",
"instructions": "Die Werte für schwierige und extreme Proben tauchen auf dem Charakterblatt nicht auf. Die Werte werden bei Klick auf den Würfelbutton neben dem Wert automatisch berechnet. Im Chat Bereich werden die Ergebnisse dann entsprechend tabellarisch für unterschiedliche Straf- oder Bonuswürfel angezeigt. Für Waffenfertigkeiten muss nur eine entsprechende Waffe gewählt werden. Es können bis zu zehn zusätzliche Fertigkeiten eingegeben werden. Für den Waffenschaden können die folgenden Werte eingegeben werden: \"+0\", \"+1/2Sb\" or \"+Sb.\" Diese Syntax ermöglicht die automatische Berechnung des Schadensbonus zum Schadenswurf.\n\nEin API Script in Verbindung mit diesem Charakterbogen kann unter https://github.com/Roll20/roll20-character-sheets/blob/master/Call_of_Cthulhu_7th_Ed/extended_autocalc.js gefunden werden. Dieses erlaub die automatische Berechnung von Schadensbonus und Statur im Charakterbogen. Hinweis zu den Würfelproben: Abweichend vom deutschen Regelwerk werden hier bis zu 3W100 geworfen und nicht nur die die Zehnerstelle bei Bonus- oder Strafwürfeln zusätzlich geworfen.",
"legacy": true
}
"legacy": true,
"version": "1695979439"
}
5 changes: 3 additions & 2 deletions Call_of_Cthulhu_7th_Ed/sheet.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,6 @@
"description": "Adds section for noting Pulp Talents"
}
],
"legacy": true
}
"legacy": true,
"version": "1695979404"
}
5 changes: 3 additions & 2 deletions Call_of_Cthulhu_7th_Ed_Chinese_Traditional/sheet.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"roll20userid": "1048758, 103705, 1466905, 1540094",
"preview": "coc_7th_ed.png",
"instructions": "2021/04/10 修正瘋狂格\n2019/09/02增加狂氣發作表\n2018/01/17增加私訊KP擲骰設定,戰鬥欄的TurnOrder骰,JSON匯出匯入功能及修正角色名不連動角卡的問題\n2018/01/11增加分頁顯示,增加關係人欄位,調查員筆記,生平故事等,武器欄位增加閃躲,戰鬥不用再拉上拉下\n2018/01/08增加擲骰顯示圖片\n2018/01/04增加全自動射擊,增加護甲,增加自動顯示極端傷害\n2018/01/03增加追逐戰檢定\n2017/12/13翻譯最新版COC7版角色卡.使用我流技能排序.增加不定性瘋狂值\n當你使用灰色擲骰按鈕,你會看到聊天紀錄上出現\"成功值/困難成功值/極端成功值\".讓你用適合的門檻來判斷是否成功.至於武器則選擇一個你武器的技能進行檢定.你可以從自訂的10個來進行檢定.而武器傷害可以拉選\"+0\", \"+1/2db\" 或 \"+db.\"來選擇是否加入傷害加成.\n現在支援低俗克蘇魯,打勾即可以變成低俗克蘇魯規則的雙倍生命值. \n\n Aqua Alex:\n (1)刪除了對js​​文件的需求,並創建了一個Workerscript,即使不是Pro 帳號也可以自動計算傷害加值和體格.\n (2) 自動計算速度等級\n (3) 獎勵/懲罰擲骰 - 灰色擲骰是普通擲骰按鈕 (同時擲出3粒骰子並顯示所有結果), 綠色擲骰按鈕只會擲出一粒骰子.\n\nZ:\n(1)速度骰檢定: 在速度等級(Move Rate) 旁邊新增擲骰,根據投擲體質的結果,顯示速度等級.\n(2)全自動射擊彈幕:武器欄,第二欄強制為全自動射擊檢定,只可以選擇機槍或衝鋒槍,左右兩粒擲骰鍵對應傷害欄及極端傷害欄的左右兩個傷害公式,可以用括號()備註每彈幕多少發.\n(3)極端傷害列:新增在武器表中,非必須填寫,但填寫後,灰色擲骰會自動顯示,而綠色擲骰只有在擲出極端成功時才會顯示,為了兼容問題,內裡想進行擲骰,請打[[]] EG. [[1d4+2+4+2(雕刻刀)]]\n(4)擲骰顯示圖片:只要在旁邊打入圖片網址並點擊按鈕即可顯示圖片,支援GIF,JPG,PNG格式.\n\nHKTRPG.com SAD",
"legacy": true
}
"legacy": true,
"version": "1695979419"
}
5 changes: 3 additions & 2 deletions Call_of_Cthulhu_7th_Ed_French/sheet.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"roll20userid": "103705,1190203,75857",
"preview": "coc_7th_ed.png",
"instructions": "Traduction et adaptation française de la feuille Call of Cthulhu 7ième édition. v1.0 (2015-12-28). Vous pouvez noter l'absence des valeurs majeures et extrêmes. Celles-ci ont été implémentées dans le jet de dés lui-même. Quand vous utilisez le bouton de jet, vous voyez, dans le chat, un jet “Valeur ordinaire/majeure/extreme. Comparez la valeur de la caractéristique ou la compétence à ces résultats pour déterminer la réussite (ou l'échec). Pour les compétences en armes, sélectionnez une des compétences listées pour lancer votre test en arme. Vous pouvez sélectionner une des dix compétences customisée comme compétence de base. Pour les dommages des armes vous pouvez spécifier un \"+0\", \"+1/2db\" or \"+db.\". Utiliser cela pour inclure votre bonus en dommage dans le jet de dommage ou non. \n\nVous pouvez trouver un script API qui correspond à cette feuille à cette adresse: https://github.com/Roll20/roll20-character-sheets/blob/master/Call_of_Cthulhu_7th_Ed/extended_autocalc.js. Ceci va permettre le calcul automatique des bonus aux dommages et de la carrure.",
"legacy": true
}
"legacy": true,
"version": "1695979427"
}
5 changes: 3 additions & 2 deletions Elite Dangerous Role Playing Game/sheet.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"roll20userid": "891555",
"preview": "EDRPG.png",
"instructions": "This sheet is designed for use with Elite Dangerous RPG core rule book.",
"legacy": true
}
"legacy": true,
"version": "1695979227"
}
5 changes: 3 additions & 2 deletions Forbidden_Lands/sheet.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,6 @@
"displaytranslationkey": "sort-stockpile"
}
],
"legacy": false
}
"legacy": false,
"version": "1695970686"
}
5 changes: 3 additions & 2 deletions FreeSpacer/sheet.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"roll20userid": "555657, 1223200",
"preview": "preview.png",
"instructions": "This is the Official character sheet for the 'Free Spacer RPG' by 'Random Alien Games', version 3.2. The sheet has been redesigned to look like the paper version plus various colour components. The sheet has player tabs and Gamemaster tabs. For version 2.8 I added Salvo Mode to the crewmember sheet and for version 3 I added it to the Contingency type Corvette tab. \n\n* The Crewmember tab is for each individual Player Character.\n* The Salvo Mode a dice roll overlay on the Crewmember Log allows you to choose a skill, specialty, and tool from the sheet. When choosing Tool mods the sheet tracks your spent charge and allows you to add advantage and enter the Threat your Gamemaster provides before clicking a roll button. Finally, click the 'Spend Charge and Close' button to close Salvo Mode and spend the tracked charge.\n* As of version 3.2, Salvo Mode of take into account the crewmember or operator’s damaged Integrity Condition Slot. Feedback shows '/2' throughout the Salvo Mode and on the RollTemplate.\n* When rolling from Salvo Mode on the Crewmember Log the Roll Template lists it as an ‘Away Salvo’ that shows your skill, specialty, and tool choices. Plus, the Charge spent, Advantage added, and Threat opposed. Finally, it shows the value of each die rolled, the result, and most likely outcome. All in Orange, grey, and black similar to the tables in the PDF.\n* The Contingency type Corvette tab is a shared sheet for the group ship.\n* Thanks to AJ, the 'Ship Configuration' widget on the Corvette tab is dynamic allowing you to create rectangles to represent each ship component in the appropriate sections, just like the paper sheet.\n* The Contingency type Corvette tab has a sheetworker that totals all repeating Assets & Trade Goods plus Complex Material and Supply resource tonnages to accurately track your ship's capacity. The total will turn red if it is greater then the total Cargo capacity listed in amenities.\n* The Salvo Mode a dice roll overlay on the Contingency type Corvette Log lets you choose the operator, which lists any Crewmember logs that have been opened this session and have a Player name listed. If your Crewmember doesn’t appear ensure it has a Player name and has been opened.\n * Salvo Mode on the Contingency type Corvette sheet allows you to select a skill and specialty from pull down lists which grab ratings from your Crewmember logs. It allows you to choose a Ship System, the Launcher module, or the Launch Bay from the sheet.\n * Like the Crewmember Salvo Mode, choosing Tool mods on the Contingency type Corvette sheet tracks your spent charge. The Launcher will also track the supply you spend. On top of this, the Launch Bay module allows you to operate your shuttle craft, equip trailers, and print new trailers. It also tracks the charge spent to the tug reactor and the supply spent to print trailers. It of course allows you to add advantage and enter the Threat your Gamemaster provides before clicking a roll button just like on the Crewmember sheet. Likewise you must click the 'Spend Charge and Close' button to close Salvo Mode and spend the tracked ship or tug charge and any supply.\n* When rolling from Salvo Mode on the Contingency type Corvette tab the Roll Template lists it as a ‘Ship Salvo’ or ‘Shuttle Salvo’ that shows your skill, specialty, and tool choices. Plus, the Charge spent, the Supply spent, Advantage added, and Threat opposed. Finally, it shows the value of each die rolled, the result, and most likely outcome. All in Orange, grey, and black similar to the tables in the PDF.\n* Both the Crewmember and Contingency type Corvette tabs have sheetworkers that control overcharge for the reactors. If you add overcharge when the charge is under capacity, it increments by one instead and If you add 1 to charge when it is at capacity, it adds Overcharge instead.\n* The Gamemaster tabs are NPC sheets for Gamemaster use.\n* The first Gamemaster sheet is the Sophont Log, which the Gamemaster uses to track individual significant people of any species.\n* The Composite Sophont sheet is used by the Gamemaster to track multiple less significant and similar people.\n* The Swarm tab tracks swarms of tiny creatures that only become a threat together.\n* The Creature tab tracks multiple similar creatures.\n* The Behemoth Log tracks massive monsters composed of up to six discrete sections.\n* The Drone tab track groups of drones.\n* The Shuttle Log tracks an individual shuttle at away-scale or squadrons of shuttles at space-scale. The upper conditions are for the squadrons, while the lower ones are for each section of one shuttle at away-scale. All tags and aspects are used for both individual shuttles and squadrons of similar ones.\n* The Small Craft Log tracks multiple Small Craft for space scale play.\n* The Ship Log track vessels with multiple sessions comparable to the crew's Ship.\n* The Capital Ship Log tracks massive capital ships, but doesn't include a map widget; instead create maps on a page. \n\n [Free Spacer Homepage](http://www.freespacer.com/) - [Sheet Wiki Page](https://wiki.roll20.net/Free_Spacer)",
"legacy": true
}
"legacy": true,
"version": "1695970653"
}
Loading

0 comments on commit 70f0e93

Please sign in to comment.