diff --git a/.github/workflows/npmpub.yml b/.github/workflows/npmpub.yml index 153dde2..b0e0b07 100644 --- a/.github/workflows/npmpub.yml +++ b/.github/workflows/npmpub.yml @@ -3,20 +3,25 @@ name: Publish to NPM on: push: branches: [master] + jobs: build: runs-on: ubuntu-latest - strategy: - matrix: - os: [ubuntu-latest] - node-version: [21.x] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '21.x' + registry-url: 'https://registry.npmjs.org' + - run: npm install - run: npm run pack - run: cp README.md ./dist/lib/README.md - - uses: JS-DevTools/npm-publish@v1 - with: - token: ${{ secrets.NPM_TOKEN }} - package: './dist/lib/package.json' + + - name: Publish to NPM + run: npm publish ./dist/lib/ --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fc27451..6d7ffab 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,13 +9,24 @@ on: jobs: build: runs-on: ubuntu-latest - strategy: - matrix: - os: [ubuntu-latest] - node-version: [21.x] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '21.x' + + - name: Install Chrome + run: | + apt-get update -qq + apt-get install -y -qq wget gnupg > /dev/null 2>&1 + wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add - > /dev/null 2>&1 + echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list + apt-get update -qq + apt-get install -y -qq google-chrome-stable > /dev/null 2>&1 + echo "CHROME_BIN=$(which google-chrome-stable)" >> $GITHUB_ENV - run: npm install - - run: npm run test:headless:singleRun \ No newline at end of file + - run: npm run test:headless:singleRun