Skip to content

Commit 830631e

Browse files
committed
chore: use ESM module and pin actions to latest versions
1 parent 0714595 commit 830631e

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

.github/scripts/update-major-tag.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// @ts-check
22

33
/** @param {import('@actions/github-script').AsyncFunctionArguments} args */
4-
module.exports = async ({ github, context }) => {
4+
export default async function updateMajorTag({ github, context }) {
55
const tag = context.payload.release?.tag_name;
66
if (!tag) {
77
throw new Error("No release tag found in event payload");
@@ -42,4 +42,4 @@ module.exports = async ({ github, context }) => {
4242
}
4343
}
4444
}
45-
};
45+
}

.github/workflows/versioning.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ jobs:
1111
actions-tagger:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
1515
- uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
1616
with:
1717
script: |
18-
const fn = require('./.github/scripts/update-major-tag.js');
19-
await fn({ github, context });
18+
const { default: updateMajorTag } = await import('${{ github.workspace }}/.github/scripts/update-major-tag.js');
19+
await updateMajorTag({ github, context });

0 commit comments

Comments
 (0)