diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index a1847c3..d43fdf3 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -22,22 +22,22 @@ jobs: with: script: | const fs = require('fs/promises'); - fs.readFile('./static/manifest.json', 'utf8') - .then(data => { + const fetchVersionInfo = async () => { + try { + const data = await fs.readFile('./static/manifest.json', 'utf8'); const manifest = JSON.parse(data); const currentVersion = manifest.version; - return fetch(`https://chromewebstore.google.com/detail/holo-key-manager/${{ secrets.CHROME_ID }}`) - }) - .then(response => response.text()) - .then(text => { + const response = await fetch(`https://chromewebstore.google.com/detail/holo-key-manager/${process.env.CHROME_ID}`); + const text = await response.text(); const versionPattern = /