aboutsummaryrefslogtreecommitdiffhomepage
path: root/.github
diff options
context:
space:
mode:
authorPeter Johanson <[email protected]>2023-12-13 19:13:21 +0000
committerPete Johanson <[email protected]>2023-12-13 11:48:28 -0800
commit52ed49b4bb2ed14ea1a5bc8305cf6f6cabb79673 (patch)
tree5de5a81c9ddbffdd29972d6523419edbeaf6892e /.github
parentff57ccc75adcce2b64d37dc923e424d026c5f12f (diff)
downloadzmk-52ed49b4bb2ed14ea1a5bc8305cf6f6cabb79673.tar.gz
zmk-52ed49b4bb2ed14ea1a5bc8305cf6f6cabb79673.zip
fix(ci): Upgrade to github-script@v7
* Also adjust form @actions/upload API changes.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml23
1 files changed, 11 insertions, 12 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 82b156e106..a7d0560d04 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -55,13 +55,12 @@ jobs:
- name: Install @actions/artifact
run: npm install @actions/artifact
- name: Build and upload artifacts
- uses: actions/github-script@v4
+ uses: actions/github-script@v7
id: boards-list
with:
script: |
const fs = require('fs');
- const artifact = require('@actions/artifact');
- const artifactClient = artifact.create();
+ const {default: artifact} = require('@actions/artifact');
const execSync = require('child_process').execSync;
@@ -90,7 +89,7 @@ jobs:
const cmakeName = shieldArgs['cmake-args'] ? '-' + (shieldArgs.nickname || shieldArgs['cmake-args'].split(' ').join('')) : '';
const artifactName = `${{ matrix.board }}${shieldArgs.shield ? '-' + shieldArgs.shield : ''}${cmakeName}-zmk`;
- await artifactClient.uploadArtifact(artifactName, files, rootDirectory, options);
+ await artifact.uploadArtifact(artifactName, files, rootDirectory, options);
} catch (e) {
console.error(`::error::Failed to build or upload ${{ matrix.board }} ${shieldArgs.shield} ${shieldArgs['cmake-args']}`);
console.error(e);
@@ -111,7 +110,7 @@ jobs:
include-list: ${{ steps.compile-list.outputs.result }}
steps:
- name: Join build lists
- uses: actions/github-script@v4
+ uses: actions/github-script@v7
id: compile-list
with:
script: |
@@ -158,7 +157,7 @@ jobs:
node-version: "14.x"
- name: Install js-yaml
run: npm install js-yaml
- - uses: actions/github-script@v4
+ - uses: actions/github-script@v7
id: core-list
with:
script: |
@@ -187,7 +186,7 @@ jobs:
node-version: "14.x"
- name: Install js-yaml
run: npm install js-yaml
- - uses: actions/github-script@v4
+ - uses: actions/github-script@v7
id: boards-list
with:
script: |
@@ -264,7 +263,7 @@ jobs:
nightly-include: ${{ steps.nightly-list.outputs.result }}
steps:
- name: Create nightly list
- uses: actions/github-script@v4
+ uses: actions/github-script@v7
id: nightly-list
with:
script: |
@@ -315,7 +314,7 @@ jobs:
- name: Install js-yaml
run: npm install js-yaml
- name: Aggregate Metadata
- uses: actions/github-script@v4
+ uses: actions/github-script@v7
id: aggregate-metadata
with:
script: |
@@ -333,7 +332,7 @@ jobs:
result-encoding: string
- name: Organize Metadata
- uses: actions/github-script@v4
+ uses: actions/github-script@v7
id: organize-metadata
with:
script: |
@@ -390,7 +389,7 @@ jobs:
id: changed-files
with:
format: "json"
- - uses: actions/github-script@v4
+ - uses: actions/github-script@v7
id: board-changes
with:
script: |
@@ -398,7 +397,7 @@ jobs:
const boardChanges = changedFiles.filter(f => f.startsWith('app/boards'));
return boardChanges.length ? 'true' : 'false';
result-encoding: string
- - uses: actions/github-script@v4
+ - uses: actions/github-script@v7
id: core-changes
with:
script: |