Skip to content

Commit

Permalink
Tooltips, main.yml
Browse files Browse the repository at this point in the history
- Tooltips: Add tooltips
- main.yml: Update main.yml
  • Loading branch information
Larkinabout committed Jun 15, 2023
1 parent 15decf0 commit 689ee31
Show file tree
Hide file tree
Showing 15 changed files with 534 additions and 192 deletions.
143 changes: 100 additions & 43 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,109 @@
name: Release Creation
name: Create Module Files For GitHub Release

env:
# The URL used for the module's "Project URL" link on FoundryVTT's website.
project_url: "https://github.com/${{github.repository}}"

# A URL that will always point to the latest manifest.
# FoundryVTT uses this URL to check whether the current module version that
# is installed is the latest version. This URL should NOT change,
# otherwise FoundryVTT won't be able to perform this check.
latest_manifest_url: "https://github.com/${{github.repository}}/releases/latest/download/module.json"

# The URL to the module archive associated with the module release being
# processed by this workflow.
release_module_url: "https://github.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/module.zip"

on:
# Only run this workflow when a release is published.
# To modify this workflow when other events occur, see:
# - https://docs.github.com/en/actions/using-workflows/triggering-a-workflow
# - https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows
# - https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
#
# Note that some steps may depend on context variables that are only
# available for release events, so if you add other events, you may need to
# alter other parts of this workflow.
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v2

# get part of the tag after the `v`
- name: Extract tag version number
id: get_version
uses: battila7/get-version-action@v2

# Substitute the Manifest and Download URLs in the module.json
- name: Substitute Manifest and Download Links For Versioned Ones
id: sub_manifest_link_version
uses: microsoft/variable-substitution@v1
with:
files: 'module.json'
env:
version: ${{steps.get_version.outputs.version-without-v}}
url: https://github.com/${{github.repository}}
manifest: https://github.com/${{github.repository}}/releases/latest/download/module.json
download: https://github.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/module.zip

# Run build
- uses: actions/setup-node@v2
with:
node-version: '16'
- run: npm install
- run: npm run build

# Create a zip file with all files required by the module to add to the release
- run: zip -r ./module.zip module.json readme.md LICENSE languages/ scripts/token-action-hud-dnd5e.min.js

# Create a release for this specific version
- name: Update Release with Files
id: create_version_release
uses: ncipollo/release-action@v1
with:
allowUpdates: true # Set this to false if you want to prevent updating existing releases
name: ${{ github.event.release.name }}
draft: ${{ github.event.release.unpublished }}
prerelease: ${{ github.event.release.prerelease }}
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: './module.json, ./module.zip'
tag: ${{ github.event.release.tag_name }}
body: ${{ github.event.release.body }}
- name: Checkout Repository
uses: actions/checkout@v3

# Extract version embedded in the tag.
# This step expects the tag to be one of the following formats:
# - "v<major>.<minor>.<patch>" (e.g., "v1.2.3")
# - "<major>.<minor>.<patch>" (e.g., "1.2.3")
#
# The version will be used by later steps to fill in the value for the
# "version" key required for a valid module manifest.
- name: Extract Version From Tag
id: get_version
uses: battila7/get-version-action@v2

# Modify "module.json" with values specific to the release.
# Since the values for the "version" and "url" keys aren't known ahead of
# time, the manifest file in the repository is updated with these values.
#
# While this does modify the manifest file in-place, the changes are not
# commited to the repository, and only exist in the action's filesystem.
- name: Modify Module Manifest With Release-Specific Values
id: sub_manifest_link_version
uses: cschleiden/replace-tokens@v1
with:
files: 'module.json'
env:
VERSION: ${{steps.get_version.outputs.version-without-v}}
URL: ${{ env.project_url }}
MANIFEST: ${{ env.latest_manifest_url }}
DOWNLOAD: ${{ env.release_module_url }}

# Run build
- uses: actions/setup-node@v3
with:
node-version: '18'
- run: npm install
- run: npm run build

# Create a "module.zip" archive containing all the module's required files.
# If you have other directories or files that will need to be added to
# your packaged module, add them here.
- name: Create Module Archive
run: |
# Note that `zip` will only emit warnings when a file or directory
# doesn't exist, it will not fail.
zip \
`# Options` \
--recurse-paths \
`# The name of the output file` \
./module.zip \
`# The files that will be included.` \
module.json \
readme.md \
LICENSE \
languages/ \
scripts/token-action-hud-dnd5e.min.js \
styles/ \
# Don't forget to add a backslash at the end of the line for any
# additional files or directories!
# Update the GitHub release with the manifest and module archive files.
- name: Update Release with Files
id: create_version_release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
name: ${{ github.event.release.name }}
draft: ${{ github.event.release.unpublished }}
prerelease: ${{ github.event.release.prerelease }}
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: './module.json, ./module.zip'
tag: ${{ github.event.release.tag_name }}
body: ${{ github.event.release.body }}
13 changes: 9 additions & 4 deletions languages/br.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"9thLevelSpells": "9th Level Spells",
"abilities": "Atributos",
"activeFeatures": "Active Features",
"artifact": "Artifact",
"artificerInfusions": "Artificer Infusions",
"atWillSpells": "At-Will Spells",
"backgroundFeatures": "Background Features",
Expand All @@ -21,6 +22,7 @@
"check": "Check",
"checks": "Testes",
"classFeatures": "Class Features",
"common": "Common",
"condition": "Condition",
"conditions": "Condições",
"crewActions": "Ações da tripulação",
Expand Down Expand Up @@ -48,17 +50,18 @@
"passiveFeatures": "Passive Features",
"psionicPowers": "Psionic Powers",
"raceFeatures": "Race Features",
"rare": "Rare",
"rests": "Descansos",
"rollInitiative": "Rolar Iniciativa",
"runes": "Runes",
"saves": "Salvaguarda",
"superiorHuntersDefense": "Superior Hunter's Defense",
"skill": "Skill",
"skills": "Pericias",
"superiorHuntersDefense": "Superior Hunter's Defense",
"uncommon": "Uncommon",
"veryRare": "Very Rare",
"settings": {

}
}"abbreviateSkills": {
"abbreviateSkills": {
"hint": "Display skill and ability names as a three-character abbreviation",
"name": "Abbreviate Skill and Ability Names"
},
Expand Down Expand Up @@ -90,5 +93,7 @@
"hint": "Show unprepared spells",
"name": "Show Unprepared Spells"
}
}
}
}
}
5 changes: 5 additions & 0 deletions languages/cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"9thLevelSpells": "9th Level Spells",
"abilities": "属性",
"activeFeatures": "Active Features",
"artifact": "Artifact",
"artificerInfusions": "Artificer Infusions",
"atWillSpells": "At-Will Spells",
"backgroundFeatures": "Background Features",
Expand All @@ -21,6 +22,7 @@
"check": "Check",
"checks": "检定",
"classFeatures": "Class Features",
"common": "Common",
"condition": "Condition",
"conditions": "状态",
"crewActions": "船員行動",
Expand Down Expand Up @@ -48,12 +50,15 @@
"passiveFeatures": "Passive Features",
"psionicPowers": "Psionic Powers",
"raceFeatures": "Race Features",
"rare": "Rare",
"rests": "休息",
"rollInitiative": "先攻掷骰",
"runes": "Runes",
"skill": "Skill",
"skills": "技能",
"superiorHuntersDefense": "Superior Hunter's Defense",
"uncommon": "Uncommon",
"veryRare": "Very Rare",
"settings": {
"abbreviateSkills": {
"hint": "Display skill and ability names as a three-character abbreviation",
Expand Down
5 changes: 5 additions & 0 deletions languages/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"9thLevelSpells": "9th Level Spells",
"abilities": "Abilities",
"activeFeatures": "Active Features",
"artifact": "Artifact",
"artificerInfusions": "Artificer Infusions",
"atWillSpells": "At-Will Spells",
"backgroundFeatures": "Background Features",
Expand All @@ -21,6 +22,7 @@
"check": "Check",
"checks": "Checks",
"classFeatures": "Class Features",
"common": "Common",
"condition": "Condition",
"conditions": "Conditions",
"crewActions": "Crew Actions",
Expand Down Expand Up @@ -48,12 +50,15 @@
"passiveFeatures": "Passive Features",
"psionicPowers": "Psionic Powers",
"raceFeatures": "Race Features",
"rare": "Rare",
"rests": "Rests",
"rollInitiative": "Initiativewurf",
"runes": "Runes",
"skill": "Skill",
"skills": "Skills",
"superiorHuntersDefense": "Superior Hunter's Defense",
"uncommon": "Uncommon",
"veryRare": "Very Rare",
"settings": {
"abbreviateSkills": {
"hint": "Display skill and ability names as a three-character abbreviation",
Expand Down
5 changes: 5 additions & 0 deletions languages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"9thLevelSpells": "9th Level Spells",
"abilities": "Abilities",
"activeFeatures": "Active Features",
"artifact": "Artifact",
"artificerInfusions": "Artificer Infusions",
"atWillSpells": "At-Will Spells",
"backgroundFeatures": "Background Features",
Expand All @@ -21,6 +22,7 @@
"check": "Check",
"checks": "Checks",
"classFeatures": "Class Features",
"common": "Common",
"condition": "Condition",
"conditions": "Conditions",
"crewActions": "Crew Actions",
Expand Down Expand Up @@ -48,12 +50,15 @@
"passiveFeatures": "Passive Features",
"psionicPowers": "Psionic Powers",
"raceFeatures": "Race Features",
"rare": "Rare",
"rests": "Rests",
"rollInitiative": "Roll Initiative",
"runes": "Runes",
"skill": "Skill",
"skills": "Skills",
"superiorHuntersDefense": "Superior Hunter's Defense",
"uncommon": "Uncommon",
"veryRare": "Very Rare",
"settings": {
"abbreviateSkills": {
"hint": "Display skill and ability names as a three-character abbreviation",
Expand Down
5 changes: 5 additions & 0 deletions languages/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"9thLevelSpells": "9th Level Spells",
"abilities": "Características",
"activeFeatures": "Active Features",
"artifact": "Artifact",
"artificerInfusions": "Artificer Infusions",
"atWillSpells": "At-Will Spells",
"backgroundFeatures": "Background Features",
Expand All @@ -21,6 +22,7 @@
"check": "Check",
"checks": "Pruebas",
"classFeatures": "Class Features",
"common": "Common",
"condition": "Condition",
"conditions": "Estados",
"crewActions": "Acciones de la tripulación",
Expand Down Expand Up @@ -48,12 +50,15 @@
"passiveFeatures": "Passive Features",
"psionicPowers": "Psionic Powers",
"raceFeatures": "Race Features",
"rare": "Rare",
"rests": "Descansos",
"rollInitiative": "Tirar iniciativa",
"runes": "Runes",
"skill": "Skill",
"skills": "Habilidades",
"superiorHuntersDefense": "Superior Hunter's Defense",
"uncommon": "Uncommon",
"veryRare": "Very Rare",
"settings": {
"abbreviateSkills": {
"hint": "Display skill and ability names as a three-character abbreviation",
Expand Down
5 changes: 5 additions & 0 deletions languages/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"9thLevelSpells": "9th Level Spells",
"abilities": "Abilités",
"activeFeatures": "Active Features",
"artifact": "Artifact",
"artificerInfusions": "Artificer Infusions",
"atWillSpells": "At-Will Spells",
"backgroundFeatures": "Background Features",
Expand All @@ -21,6 +22,7 @@
"check": "Check",
"checks": "Tests",
"classFeatures": "Class Features",
"common": "Common",
"condition": "Condition",
"conditions": "Conditions",
"crewActions": "Actions de l'équipage",
Expand Down Expand Up @@ -48,12 +50,15 @@
"passiveFeatures": "Passive Features",
"psionicPowers": "Psionic Powers",
"raceFeatures": "Race Features",
"rare": "Rare",
"rests": "Repos",
"rollInitiative": "Lancer l'initiative",
"runes": "Runes",
"skill": "Skill",
"skills": "Compétences",
"superiorHuntersDefense": "Superior Hunter's Defense",
"uncommon": "Uncommon",
"veryRare": "Very Rare",
"settings": {
"abbreviateSkills": {
"hint": "Display skill and ability names as a three-character abbreviation",
Expand Down
5 changes: 5 additions & 0 deletions languages/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"9thLevelSpells": "9th Level Spells",
"abilities": "Capacità",
"activeFeatures": "Active Features",
"artifact": "Artifact",
"artificerInfusions": "Artificer Infusions",
"atWillSpells": "At-Will Spells",
"backgroundFeatures": "Background Features",
Expand All @@ -21,6 +22,7 @@
"check": "Check",
"checks": "Caratteristiche",
"classFeatures": "Class Features",
"common": "Common",
"condition": "Condition",
"conditions": "Condizioni",
"crewActions": "Azioni dell'equipaggio",
Expand Down Expand Up @@ -48,12 +50,15 @@
"passiveFeatures": "Passive Features",
"psionicPowers": "Psionic Powers",
"raceFeatures": "Race Features",
"rare": "Rare",
"rests": "Riposi",
"rollInitiative": "Tira Iniziativa",
"runes": "Runes",
"skill": "Skill",
"skills": "Abilità",
"superiorHuntersDefense": "Superior Hunter's Defense",
"uncommon": "Uncommon",
"veryRare": "Very Rare",
"settings": {
"abbreviateSkills": {
"hint": "Display skill and ability names as a three-character abbreviation",
Expand Down
Loading

0 comments on commit 689ee31

Please sign in to comment.