Skip to content

Commit

Permalink
gh action release tag & update pack folders
Browse files Browse the repository at this point in the history
  • Loading branch information
DEVTomatoCake committed Apr 13, 2024
1 parent 2beb486 commit a16f67a
Show file tree
Hide file tree
Showing 5 changed files with 124 additions and 27 deletions.
1 change: 1 addition & 0 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: ESLint

on:
push:
paths: ["/package.json", "**/*.js"]

jobs:
lint:
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/extension-preview-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Extension preview release
on:
workflow_dispatch:
push:
paths: ["vscExtension/src/*.js"]
paths: ["/.github/workflows/extension-preview-release.yml", "vscExtension/src/*.js"]

jobs:
lint:
Expand All @@ -19,6 +19,11 @@ jobs:
node-version: 21
cache: "npm"

- name: "🛵 set up env vars"
run: |
echo "SHA_SHORT=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
echo "EXTENSION_VERSION=$(node -p -e "require('./vscExtension/package.json').version")" >> "$GITHUB_ENV"
- name: "🏁 build extension"
run: |
cd vscExtension
Expand All @@ -28,14 +33,17 @@ jobs:
- name: "🚀 release extension"
uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5
with:
allowUpdates: true
artifactErrorsFailBuild: true
artifacts: vscExtension/*.vsix
commit: ${{ github.sha }}
makeLatest: false
artifactErrorsFailBuild: true
prerelease: true
tag: v${{ env.EXTENSION_VERSION }}-preview
body: |
This is an automatically generated **preview** release of the Pack Analyzer extension.
You can install it by downloading the `.vsix` file below and installing it in [Visual Studio Code](https://code.visualstudio.com) or in e.g. VSCodium.
Triggering commit:
[`${{ github.sha }}`](https://github.com/DEVTomatoCake/Pack-Analyzer/commit/${{ github.sha }}) ${{ github.event.head_commit.message }}
[`${{ env.SHA_SHORT }}`](https://github.com/DEVTomatoCake/Pack-Analyzer/commit/${{ github.sha }}) ${{ github.event.head_commit.message }}
34 changes: 28 additions & 6 deletions assets/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,28 @@ let emptyFiles = []
let dpExclusive = {
folders: {
advancements: 0,
loot_tables: 0,
recipes: 0,
predicates: 0,
banner_pattern: 0,
chat_type: 0,
damage_type: 0,
datapacks: 0,
dimension: 0,
dimension_type: 0,
item_modifiers: 0,
loot_tables: 0,
predicates: 0,
recipes: 0,
structures: 0,
tags: 0,
trim_material: 0,
trim_pattern: 0,
wolf_variant: 0,
worldgen: 0
},
tags: {
banner_pattern: 0,
blocks: 0,
cat_variant: 0,
damage_types: 0,
entity_types: 0,
fluids: 0,
functions: 0,
Expand Down Expand Up @@ -578,17 +589,28 @@ async function mainScan(hasData = false) {
dpExclusive = {
folders: {
advancements: 0,
loot_tables: 0,
recipes: 0,
predicates: 0,
banner_pattern: 0,
chat_type: 0,
damage_type: 0,
datapacks: 0,
dimension: 0,
dimension_type: 0,
item_modifiers: 0,
loot_tables: 0,
predicates: 0,
recipes: 0,
structures: 0,
tags: 0,
trim_material: 0,
trim_pattern: 0,
wolf_variant: 0,
worldgen: 0
},
tags: {
banner_pattern: 0,
blocks: 0,
cat_variant: 0,
damage_types: 0,
entity_types: 0,
fluids: 0,
functions: 0,
Expand Down
51 changes: 42 additions & 9 deletions vscExtension/out/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,28 @@ let emptyFiles = []
let dpExclusive = {
folders: {
advancements: 0,
loot_tables: 0,
recipes: 0,
predicates: 0,
banner_pattern: 0,
chat_type: 0,
damage_type: 0,
datapacks: 0,
dimension: 0,
dimension_type: 0,
item_modifiers: 0,
loot_tables: 0,
predicates: 0,
recipes: 0,
structures: 0,
tags: 0,
trim_material: 0,
trim_pattern: 0,
wolf_variant: 0,
worldgen: 0
},
tags: {
banner_pattern: 0,
blocks: 0,
cat_variant: 0,
damage_types: 0,
entity_types: 0,
fluids: 0,
functions: 0,
Expand Down Expand Up @@ -416,17 +427,28 @@ class PackAnalyzer {
dpExclusive = {
folders: {
advancements: 0,
loot_tables: 0,
recipes: 0,
predicates: 0,
banner_pattern: 0,
chat_type: 0,
damage_type: 0,
datapacks: 0,
dimension: 0,
dimension_type: 0,
item_modifiers: 0,
loot_tables: 0,
predicates: 0,
recipes: 0,
structures: 0,
tags: 0,
trim_material: 0,
trim_pattern: 0,
wolf_variant: 0,
worldgen: 0
},
tags: {
banner_pattern: 0,
blocks: 0,
cat_variant: 0,
damage_types: 0,
entity_types: 0,
fluids: 0,
functions: 0,
Expand Down Expand Up @@ -518,17 +540,28 @@ class PackAnalyzer {
].filter(Boolean).map(child => ({item: child, parent: item}))
if (item == "folders") return [
"advancements",
"loot_tables",
"recipes",
"predicates",
"banner_pattern",
"chat_type",
"damage_type",
"datapacks",
"dimension",
"dimension_type",
"item_modifiers",
"loot_tables",
"predicates",
"recipes",
"structures",
"tags",
"trim_material",
"trim_pattern",
"wolf_variant",
"worldgen"
].filter(Boolean).map(child => ({item: child, parent: item}))
if (item == "tags") return [
"banner_pattern",
"blocks",
"cat_variant",
"damage_types",
"entity_types",
"fluids",
"functions",
Expand Down
51 changes: 42 additions & 9 deletions vscExtension/src/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,28 @@ let emptyFiles = []
let dpExclusive = {
folders: {
advancements: 0,
loot_tables: 0,
recipes: 0,
predicates: 0,
banner_pattern: 0,
chat_type: 0,
damage_type: 0,
datapacks: 0,
dimension: 0,
dimension_type: 0,
item_modifiers: 0,
loot_tables: 0,
predicates: 0,
recipes: 0,
structures: 0,
tags: 0,
trim_material: 0,
trim_pattern: 0,
wolf_variant: 0,
worldgen: 0
},
tags: {
banner_pattern: 0,
blocks: 0,
cat_variant: 0,
damage_types: 0,
entity_types: 0,
fluids: 0,
functions: 0,
Expand Down Expand Up @@ -416,17 +427,28 @@ class PackAnalyzer {
dpExclusive = {
folders: {
advancements: 0,
loot_tables: 0,
recipes: 0,
predicates: 0,
banner_pattern: 0,
chat_type: 0,
damage_type: 0,
datapacks: 0,
dimension: 0,
dimension_type: 0,
item_modifiers: 0,
loot_tables: 0,
predicates: 0,
recipes: 0,
structures: 0,
tags: 0,
trim_material: 0,
trim_pattern: 0,
wolf_variant: 0,
worldgen: 0
},
tags: {
banner_pattern: 0,
blocks: 0,
cat_variant: 0,
damage_types: 0,
entity_types: 0,
fluids: 0,
functions: 0,
Expand Down Expand Up @@ -518,17 +540,28 @@ class PackAnalyzer {
].filter(Boolean).map(child => ({item: child, parent: item}))
if (item == "folders") return [
"advancements",
"loot_tables",
"recipes",
"predicates",
"banner_pattern",
"chat_type",
"damage_type",
"datapacks",
"dimension",
"dimension_type",
"item_modifiers",
"loot_tables",
"predicates",
"recipes",
"structures",
"tags",
"trim_material",
"trim_pattern",
"wolf_variant",
"worldgen"
].filter(Boolean).map(child => ({item: child, parent: item}))
if (item == "tags") return [
"banner_pattern",
"blocks",
"cat_variant",
"damage_types",
"entity_types",
"fluids",
"functions",
Expand Down

0 comments on commit a16f67a

Please sign in to comment.