Skip to content

Commit 417b8c9

Browse files
authored
Update check-latest-release.yml
1 parent 9a876d3 commit 417b8c9

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/check-latest-release.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,15 @@ jobs:
2626

2727
- name: Check README for latest release URLs
2828
run: |
29-
node <<EOF
29+
node --input-type=module <<'EOF'
3030
import { readFileSync } from 'fs';
3131
import { Octokit } from '@octokit/rest';
3232
3333
const octokit = new Octokit(); // Unauthenticated for public API calls
3434
35-
(async () => {
35+
const checkLatestRelease = async () => {
3636
const readme = readFileSync('README.md', 'utf-8');
37-
38-
const regex = /- (.*?) \(https:\\/\\/github\\.com\\/.*?)\.*?\(.*?)\\(https:\\/\\/github\\.com\\/.*?\\/releases\\/.*)\/g;
37+
const regex = /- (.*?) (https:\/\/github\.com\/.*?).*?(.*?)(https:\/\/github\.com\/.*?\/releases\/.*)/g;
3938
let match;
4039
let allCorrect = true;
4140
@@ -69,5 +68,7 @@ jobs:
6968
if (!allCorrect) {
7069
process.exit(1);
7170
}
72-
})();
71+
};
72+
73+
checkLatestRelease();
7374
EOF

0 commit comments

Comments
 (0)