Skip to content

Commit

Permalink
Fix script
Browse files Browse the repository at this point in the history
  • Loading branch information
mrruby committed Feb 29, 2024
1 parent abe08fe commit d89aea4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install isomorphic-fetch
run: npm install isomorphic-fetch
- name: Install axios
run: npm install axios
- name: Check version against latest release in Chrome Web Store
id: check_version
uses: actions/github-script@v6
with:
script: |
const fs = require('fs/promises');
require('isomorphic-fetch');
const axios = require('axios');
const fetchVersionInfo = async () => {
try {
const data = await fs.readFile('./static/manifest.json', 'utf8');
Expand All @@ -33,8 +33,8 @@ jobs:
console.log('Parsed manifest:', manifest);
const currentVersion = manifest.version;
console.log('Current version:', currentVersion);
const response = await fetch(`https://chromewebstore.google.com/detail/holo-key-manager/${{ vars.CHROME_ID}}`);
const text = await response.text();
const response = await axios.get(`https://chromewebstore.google.com/detail/holo-key-manager/${{ vars.CHROME_ID}}`, { maxRedirects: 10 });
const text = response.data;
console.log('Response text:', text);
const versionPattern = /<div[^>]*>Version<\/div><div[^>]*>(\d+\.\d+\.\d+)<\/div>/;
console.log('Version pattern:', versionPattern);
Expand Down

0 comments on commit d89aea4

Please sign in to comment.