Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 23 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Deploy

# About this workflow:
# It is triggered on push events to branches production and testing. Then it performs a checkout of the current repo
# and sets up a node environment (v12). Following, it will run `npm ci` to build the package. Next, it will look at your
# and sets up a node environment (see .nvmrc). Following, it will run `npm ci` to build the package. Next, it will look at your
# commit message, if it includes '#patch', '#minor', or '#major' it will bump the package version accordingly.
# Finally, the `npm publish` command will be run, when on branch testing it will run `npm publish --tag beta` to publish
# it under the beta flag on npm. Note: if no '#patch', '#minor', or '#major' flag is present in the latest commit
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
steps:
# Checks out the current repository.
- name: Checkout git repository
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
# The token below is only necessary if you want to push the version bump to a protected branch
token: ${{ secrets.HOMEY_GITHUB_ACTIONS_BOT_PERSONAL_ACCESS_TOKEN }}
Expand All @@ -63,16 +63,32 @@ jobs:
# Configures a Node.js environment pointed at the public npm registry so
# `npm publish` uses OIDC against npmjs.org.
- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v7
with:
node-version-file: .nvmrc
cache: 'npm'
registry-url: https://registry.npmjs.org

# Run `npm ci && npm run build` to re-create your local environment (make sure to commit your - package-lock.json!).
- name: Build
# OIDC trusted publishing needs npm 11.5.1 or newer. Node 22 bundles npm 10,
# and setup-node installs whatever npm ships with the Node version.
- name: Upgrade npm for trusted publishing
run: npm install -g npm@^11.5.1

# Run `npm ci` to re-create your local environment (make sure to commit your - package-lock.json!).
- name: Install
run: npm ci

# Nothing below this point runs if the package does not lint, format or test
# cleanly, so a push to testing cannot publish a beta that was never checked.
# Ahead of the docs build, which is the slowest step here.
- name: Validate
run: |
npm ci
npm run build
npm run lint
npm run format:check
npm test

- name: Build
run: npm run build

- name: Version bump patch
if: github.event.inputs.versionBumpType == 'patch' || contains(github.event.head_commit.message, '#patch') && !contains(github.event.head_commit.message, '#minor') && !contains(github.event.head_commit.message, '#major')
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ jobs:
name: Build & Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v7
with:
node-version-file: .nvmrc
cache: 'npm'

# Build
- name: Build
Expand All @@ -42,7 +43,7 @@ jobs:

# Deploy
- name: Deploy To GitHub Pages
uses: peaceiris/actions-gh-pages@v3.8.0
uses: peaceiris/actions-gh-pages@v4
with:
personal_token: ${{ secrets.HOMEY_GITHUB_ACTIONS_BOT_PERSONAL_ACCESS_TOKEN }}
publish_dir: ./build
4 changes: 2 additions & 2 deletions .github/workflows/generate-types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
ref: ${{ github.ref_name }}
token: ${{ secrets.HOMEY_GITHUB_ACTIONS_BOT_PERSONAL_ACCESS_TOKEN }}

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v7
with:
node-version-file: .nvmrc
cache: 'npm'
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
branches:
- master
- production
- testing
pull_request:

jobs:
Expand All @@ -21,12 +22,13 @@ jobs:
runs-on: ubuntu-latest
steps:
# Checks out the current repository.
- uses: actions/checkout@v4
- uses: actions/checkout@v7

# Configures a Node.js environment.
- uses: actions/setup-node@v4
- uses: actions/setup-node@v7
with:
node-version-file: .nvmrc
cache: 'npm'

# Run `npm ci` to re-create your local environment (make sure to commit your package-lock.json!).
# Finally run `npm run lint` (make sure you have defined a lint command in package.json e.g. "lint": "eslint .").
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
branches:
- master
- production
- testing
Comment thread
RobinBol marked this conversation as resolved.
pull_request:

jobs:
Expand All @@ -22,12 +23,13 @@ jobs:

steps:
# Checks out the current repository.
- uses: actions/checkout@v4
- uses: actions/checkout@v7

# Configures a Node.js environment.
- uses: actions/setup-node@v4
- uses: actions/setup-node@v7
with:
node-version-file: .nvmrc
cache: 'npm'

# Run `npm ci` to re-create your local environment (make sure to commit your package-lock.json!).
# Finally run `npm test` (make sure you have defined a proper test command in package.json).
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
24
22
Loading