Skip to content

Commit c987388

Browse files
committed
できたかな
1 parent b978984 commit c987388

3 files changed

Lines changed: 50 additions & 31 deletions

File tree

.github/workflows/publish.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,30 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 2
18+
19+
- name: Check if version changed
20+
id: version
21+
run: |
22+
CURRENT=$(node -p "require('./package.json').version")
23+
git show HEAD~1:package.json > /tmp/prev-package.json 2>/dev/null || echo '{}' > /tmp/prev-package.json
24+
PREVIOUS=$(node -p "require('/tmp/prev-package.json').version || 'none'")
25+
echo "current=$CURRENT, previous=$PREVIOUS"
26+
if [ "$CURRENT" != "$PREVIOUS" ]; then
27+
echo "changed=true" >> "$GITHUB_OUTPUT"
28+
else
29+
echo "changed=false" >> "$GITHUB_OUTPUT"
30+
echo "Version unchanged ($CURRENT) - skipping publish."
31+
fi
1632
1733
- uses: actions/setup-node@v4
34+
if: steps.version.outputs.changed == 'true'
1835
with:
1936
node-version: 20
2037

2138
- run: npm ci
39+
if: steps.version.outputs.changed == 'true'
2240

2341
- run: npx vsce publish -p ${{ secrets.VSCE_PAT }}
42+
if: steps.version.outputs.changed == 'true'

package-lock.json

Lines changed: 29 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "mc-mod-utility",
33
"displayName": "MC Mod Utility",
44
"description": "Scaffold Minecraft mod projects and add components for Forge, Fabric, and NeoForge",
5-
"version": "0.1.4",
5+
"version": "0.1.5",
66
"publisher": "MC-Mod-Utility",
77
"repository": {
88
"type": "git",
@@ -152,7 +152,7 @@
152152
"eslint": "^9.39.3"
153153
},
154154
"overrides": {
155-
"serialize-javascript": ">=7.0.3",
155+
"serialize-javascript": ">=7.0.5",
156156
"diff": ">=8.0.3"
157157
}
158158
}

0 commit comments

Comments
 (0)