Skip to content

Commit 0492c44

Browse files
committed
CI: prettier-pr a check-only y actions a Node 24
- prettier-pr.yml: deja de auto-commitear y pushear a develop (causaba GH006 al ser rama protegida con firmas verificadas y un commit de bot sin firmar); ahora solo valida (prettier --check + grunt jshint). El formateo ya lo garantiza el hook de pre-commit local (Prettier --write + JSHint), instalado por grunt setupDevEnv. - Todos los workflows: actions/checkout, actions/setup-node y actions/upload-artifact de @v4 a @v5 (runtime Node 24), para quitar el aviso de deprecación de Node.js 20.
1 parent 68cd51a commit 0492c44

9 files changed

Lines changed: 46 additions & 65 deletions

.github/workflows/build-windows-manual.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
# Steps represent a sequence of tasks that will be executed as part of the job
1414
steps:
1515
# Checkout the develop branch
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v5
1717
with:
1818
ref: develop
1919

@@ -22,7 +22,7 @@ jobs:
2222
sed -i 's/\("nw": "[^"]*\)-sdk"/\1"/g' package.json
2323
2424
- name: Setup Nodejs version
25-
uses: actions/setup-node@v4
25+
uses: actions/setup-node@v5
2626
with:
2727
node-version: '23.3.0'
2828

@@ -73,7 +73,7 @@ jobs:
7373
env:
7474
ICESTUDIO_VERSION: '${{steps.icestudio_json.outputs.icestudio_version}}'
7575
TIMESTAMP: '${{steps.build_date.outputs.icestudio_timestamp}}'
76-
uses: 'actions/upload-artifact@v4'
76+
uses: 'actions/upload-artifact@v5'
7777
with:
7878
name: 'win64_MSI_${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}'
7979
path: 'dist/icestudio-${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}-win64.exe'
@@ -83,7 +83,7 @@ jobs:
8383
env:
8484
ICESTUDIO_VERSION: '${{steps.icestudio_json.outputs.icestudio_version}}'
8585
TIMESTAMP: '${{steps.build_date.outputs.icestudio_timestamp}}'
86-
uses: 'actions/upload-artifact@v4'
86+
uses: 'actions/upload-artifact@v5'
8787
with:
8888
name: 'win64_ZIP_${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}'
8989
path: 'dist/icestudio-${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}-win64.zip'

.github/workflows/main-aarch64.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
build:
1313
runs-on: ubuntu-24.04
1414
steps:
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@v5
1616

1717
- name: Setup Nodejs version
18-
uses: actions/setup-node@v4
18+
uses: actions/setup-node@v5
1919
with:
2020
node-version: '23.3.0'
2121

@@ -46,7 +46,7 @@ jobs:
4646
env:
4747
ICESTUDIO_VERSION: '${{steps.icestudio_json.outputs.icestudio_version}}'
4848
TIMESTAMP: '${{steps.build_date.outputs.icestudio_timestamp}}'
49-
uses: 'actions/upload-artifact@v4'
49+
uses: 'actions/upload-artifact@v5'
5050
with:
5151
name: 'Aarch64_ZIP_${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}'
5252
path: 'dist/icestudio-${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}-aarch64.zip'

.github/workflows/main-osx-arm64.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
build:
1818
runs-on: macOS-latest
1919
steps:
20-
- uses: actions/checkout@v4
20+
- uses: actions/checkout@v5
2121

2222
- name: Setup Nodejs version
23-
uses: actions/setup-node@v4
23+
uses: actions/setup-node@v5
2424
with:
2525
node-version: '23.3.0'
2626

@@ -52,7 +52,7 @@ jobs:
5252
env:
5353
ICESTUDIO_VERSION: '${{fromJson(steps.icestudio_json.outputs.packageJson).version}}'
5454
TIMESTAMP: '${{fromJson(steps.build_date.outputs.buildJson).ts}}'
55-
uses: actions/upload-artifact@v4
55+
uses: actions/upload-artifact@v5
5656
with:
5757
name: 'osxarm64_DMG_${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}'
5858
path: 'dist/icestudio-${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}-osxarm64.dmg'

.github/workflows/main-windows.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
build:
1616
runs-on: ubuntu-22.04
1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v5
1919

2020
- name: Setup Nodejs version
21-
uses: actions/setup-node@v4
21+
uses: actions/setup-node@v5
2222
with:
2323
node-version: '23.3.0'
2424

@@ -53,7 +53,7 @@ jobs:
5353
env:
5454
ICESTUDIO_VERSION: '${{steps.icestudio_json.outputs.icestudio_version}}'
5555
TIMESTAMP: '${{steps.build_date.outputs.icestudio_timestamp}}'
56-
uses: 'actions/upload-artifact@v4'
56+
uses: 'actions/upload-artifact@v5'
5757
with:
5858
name: 'win64_installer_${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}'
5959
path: 'dist/icestudio-${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}-win64.exe'
@@ -63,7 +63,7 @@ jobs:
6363
env:
6464
ICESTUDIO_VERSION: '${{steps.icestudio_json.outputs.icestudio_version}}'
6565
TIMESTAMP: '${{steps.build_date.outputs.icestudio_timestamp}}'
66-
uses: 'actions/upload-artifact@v4'
66+
uses: 'actions/upload-artifact@v5'
6767
with:
6868
name: 'win64_ZIP_${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}'
6969
path: 'dist/icestudio-${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}-win64.zip'

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
build:
1616
runs-on: ubuntu-24.04
1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v5
1919

2020
- name: Setup Nodejs version
21-
uses: actions/setup-node@v4
21+
uses: actions/setup-node@v5
2222
with:
2323
node-version: '23.3.0'
2424

@@ -50,7 +50,7 @@ jobs:
5050
env:
5151
ICESTUDIO_VERSION: '${{steps.icestudio_json.outputs.icestudio_version}}'
5252
TIMESTAMP: '${{steps.build_date.outputs.icestudio_timestamp}}'
53-
uses: 'actions/upload-artifact@v4'
53+
uses: 'actions/upload-artifact@v5'
5454
with:
5555
name: 'linux64_AppImage_${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}'
5656
path: 'dist/icestudio-${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}-linux64.AppImage'
@@ -60,7 +60,7 @@ jobs:
6060
env:
6161
ICESTUDIO_VERSION: '${{steps.icestudio_json.outputs.icestudio_version}}'
6262
TIMESTAMP: '${{steps.build_date.outputs.icestudio_timestamp}}'
63-
uses: 'actions/upload-artifact@v4'
63+
uses: 'actions/upload-artifact@v5'
6464
with:
6565
name: 'linux64_ZIP_${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}'
6666
path: 'dist/icestudio-${{env.ICESTUDIO_VERSION}}${{env.TIMESTAMP}}-linux64.zip'

.github/workflows/nightly.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
date: ${{ steps.meta.outputs.date }}
3838
tag: ${{ steps.meta.outputs.tag }}
3939
steps:
40-
- uses: actions/checkout@v4
40+
- uses: actions/checkout@v5
4141
with:
4242
ref: develop
4343
fetch-depth: 0
@@ -78,12 +78,12 @@ jobs:
7878
TAG: ${{ needs.check.outputs.tag }}
7979
NW_FLAVOR: sdk
8080
steps:
81-
- uses: actions/checkout@v4
81+
- uses: actions/checkout@v5
8282
with:
8383
ref: develop
8484
fetch-depth: 0
8585

86-
- uses: actions/setup-node@v4
86+
- uses: actions/setup-node@v5
8787
with:
8888
node-version: '23.3.0'
8989

@@ -157,11 +157,11 @@ jobs:
157157
NW_FLAVOR: sdk
158158
CODESIGN_ID: '-'
159159
steps:
160-
- uses: actions/checkout@v4
160+
- uses: actions/checkout@v5
161161
with:
162162
ref: develop
163163

164-
- uses: actions/setup-node@v4
164+
- uses: actions/setup-node@v5
165165
with:
166166
node-version: '23.3.0'
167167

@@ -199,11 +199,11 @@ jobs:
199199
TAG: ${{ needs.check.outputs.tag }}
200200
NW_FLAVOR: sdk
201201
steps:
202-
- uses: actions/checkout@v4
202+
- uses: actions/checkout@v5
203203
with:
204204
ref: develop
205205

206-
- uses: actions/setup-node@v4
206+
- uses: actions/setup-node@v5
207207
with:
208208
node-version: '23.3.0'
209209

@@ -234,7 +234,7 @@ jobs:
234234
if: always() && needs.check.outputs.should_build == 'true'
235235
runs-on: ubuntu-latest
236236
steps:
237-
- uses: actions/checkout@v4
237+
- uses: actions/checkout@v5
238238
with:
239239
ref: develop
240240
- name: Delete nightlies older than 15 days

.github/workflows/prettier-pr.yml

Lines changed: 13 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -13,43 +13,24 @@ jobs:
1313

1414
steps:
1515
- name: Checkout Repository
16-
uses: actions/checkout@v4
16+
uses: actions/checkout@v5
1717

1818
- name: Setup Node.js
19-
uses: actions/setup-node@v4
19+
uses: actions/setup-node@v5
2020
with:
2121
node-version: '23.3.0'
2222
cache: 'npm'
2323

2424
- name: Install Dependencies
25-
run: npm ci --legacy-peer-deps
26-
27-
# If prettier or jshint fails, push or PR will be rejected
28-
- name: Commit and Push Changes with linting and auto-format
29-
if: success()
25+
run: npm ci --legacy-peer-deps --ignore-scripts
26+
27+
# Formatting and linting are enforced at COMMIT TIME by the local
28+
# pre-commit hook (scripts/git/pre-commit: runs Prettier --write and then
29+
# JSHint), installed automatically by `grunt setupDevEnv` on npm install.
30+
# Here we only VALIDATE and never commit/push, so nothing is written to
31+
# the protected 'develop' branch. (The previous version auto-committed and
32+
# pushed, which failed with GH006 because the bot commit was not signed.)
33+
- name: Check formatting (Prettier) and linting (JSHint)
3034
run: |
31-
git config --global user.name "github-actions[bot]"
32-
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
33-
34-
# Intentar hacer commit
35-
git add .
36-
if git commit -m "🚀 Auto-format code and linting check"; then
37-
echo "✅ Commit successful, pushing and continuing pipeline..."
38-
git push
39-
else
40-
COMMIT_EXIT_CODE=$?
41-
# Check if the pre-commit hook created the failure flag file
42-
if [ -f "pre-commit.failed" ]; then
43-
echo "❌ Pre-commit hook failed (JSHint, Prettier, etc.), aborting pipeline."
44-
rm -f pre-commit.failed # Clean up the flag file
45-
exit 1
46-
elif [ $COMMIT_EXIT_CODE -eq 1 ]; then
47-
echo "⚠️ No changes detected, continuing pipeline..."
48-
exit 0
49-
else
50-
echo "❌ Unexpected git commit error (code: $COMMIT_EXIT_CODE), aborting pipeline."
51-
exit $COMMIT_EXIT_CODE
52-
fi
53-
54-
fi
55-
35+
npx prettier --check .
36+
npm run jshint

.github/workflows/release-stable.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
2626
# Checkout the master repo branch
2727
- name: Checkout!
28-
uses: actions/checkout@v4
28+
uses: actions/checkout@v5
2929
with:
3030
ref: master
3131

@@ -50,7 +50,7 @@ jobs:
5050
5151
# Install Node
5252
- name: Setup Nodejs version
53-
uses: actions/setup-node@v4
53+
uses: actions/setup-node@v5
5454
with:
5555
node-version: '22.7.0'
5656

@@ -126,12 +126,12 @@ jobs:
126126

127127
steps:
128128
- name: Checkout the master repo branch
129-
uses: actions/checkout@v4
129+
uses: actions/checkout@v5
130130
with:
131131
ref: master
132132

133133
- name: Setup Nodejs version
134-
uses: actions/setup-node@v4
134+
uses: actions/setup-node@v5
135135
with:
136136
node-version: '21.1.0'
137137

@@ -191,12 +191,12 @@ jobs:
191191
# Steps represent a sequence of tasks that will be executed as part of the job
192192
steps:
193193
# Checkout the develop branch
194-
- uses: actions/checkout@v4
194+
- uses: actions/checkout@v5
195195
with:
196196
ref: master
197197

198198
- name: Setup Nodejs version
199-
uses: actions/setup-node@v4
199+
uses: actions/setup-node@v5
200200
with:
201201
node-version: '23.3.0'
202202

.github/workflows/test-upload-artifact.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ jobs:
1717
- name: Test creating dist files
1818
run: dd if=/dev/zero of=test.dat bs=1024 count=1024
1919
- name: 'Upload artifact'
20-
uses: 'actions/upload-artifact@v4'
20+
uses: 'actions/upload-artifact@v5'
2121
with:
2222
path: test.dat

0 commit comments

Comments
 (0)