Skip to content

Commit 6de71ee

Browse files
⬆️ Modernize action runtime to Node 24
1 parent 2f7a2a3 commit 6de71ee

2 files changed

Lines changed: 28 additions & 8 deletions

File tree

.github/workflows/build.yml

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,23 @@ on:
44
push:
55
branches:
66
- master
7+
pull_request:
8+
branches:
9+
- master
10+
permissions:
11+
contents: read
712
jobs:
8-
release:
9-
name: Build and publish
13+
build:
14+
name: Build, test, and package
1015
runs-on: ubuntu-latest
11-
if: "!contains(github.event.head_commit.message, '[skip ci]')"
16+
if: "github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip ci]')"
1217
steps:
1318
- name: Checkout
1419
uses: actions/checkout@v7
15-
with:
16-
ref: ${{ github.head_ref }}
17-
token: ${{ secrets.GITHUB_TOKEN }}
1820
- name: Setup Node.js
1921
uses: actions/setup-node@v7
2022
with:
21-
node-version: "lts/*"
23+
node-version: "24.x"
2224
- name: Cache node modules
2325
uses: actions/cache@v6
2426
env:
@@ -38,6 +40,24 @@ jobs:
3840
run: npm run test
3941
- name: Build package
4042
run: npm run package
43+
publish:
44+
name: Publish package
45+
needs: build
46+
if: "github.event_name == 'push' && github.ref == 'refs/heads/master' && !contains(github.event.head_commit.message, '[skip ci]')"
47+
permissions:
48+
contents: write
49+
runs-on: ubuntu-latest
50+
steps:
51+
- name: Checkout
52+
uses: actions/checkout@v7
53+
- name: Setup Node.js
54+
uses: actions/setup-node@v7
55+
with:
56+
node-version: "24.x"
57+
- name: Install dependencies
58+
run: npm ci
59+
- name: Build package
60+
run: npm run build && npm run package
4161
- name: Publish package
4262
uses: stefanzweifel/git-auto-commit-action@v7
4363
with:

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: "Stethoscope"
22
description: "Track, visualize, and embed your health and life data"
33
author: "Stethoscoper <https://github.com/stethoscoper>"
44
runs:
5-
using: "node16"
5+
using: "node24"
66
main: "dist/index.js"
77
branding:
88
icon: "umbrella"

0 commit comments

Comments
 (0)