Publish #17
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish | |
| on: | |
| release: | |
| types: [created] | |
| jobs: | |
| publish-npm: | |
| name: Publish to npm | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: 18 | |
| registry-url: https://registry.npmjs.org/ | |
| cache: npm | |
| - name: Install Chromium runtime deps (Linux) | |
| run: | | |
| sudo apt-get update | |
| common="libxkbcommon0 libgbm1 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libnss3 libnspr4 libx11-6 libx11-xcb1 libxext6 libxshmfence1 libdrm2" | |
| if apt-cache show libasound2t64 >/dev/null 2>&1; then | |
| sudo apt-get install -y \ | |
| libatk1.0-0t64 libatk-bridge2.0-0t64 libcups2t64 libasound2t64 \ | |
| libatspi2.0-0t64 libglib2.0-0t64 libgtk-3-0t64 \ | |
| $common | |
| else | |
| sudo apt-get install -y \ | |
| libatk1.0-0 libatk-bridge2.0-0 libcups2 libasound2 \ | |
| libatspi2.0-0 libglib2.0-0 libgtk-3-0 \ | |
| $common | |
| fi | |
| - run: npm ci | |
| - run: npm test | |
| - run: npm version ${TAG_NAME} --git-tag-version=false | |
| env: | |
| TAG_NAME: ${{ github.event.release.tag_name }} | |
| # Install latest version of npm for publishing with provenance | |
| - run: npm install -g npm | |
| - run: npm whoami; npm --ignore-scripts publish --provenance --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{secrets.npm_token}} | |
| publish-github: | |
| name: Publish to GitHub Packages | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: 18 | |
| registry-url: https://npm.pkg.github.com | |
| cache: npm | |
| scope: '@github' | |
| - name: Install Chromium runtime deps (Linux) | |
| run: | | |
| sudo apt-get update | |
| common="libxkbcommon0 libgbm1 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libnss3 libnspr4 libx11-6 libx11-xcb1 libxext6 libxshmfence1 libdrm2" | |
| if apt-cache show libasound2t64 >/dev/null 2>&1; then | |
| sudo apt-get install -y \ | |
| libatk1.0-0t64 libatk-bridge2.0-0t64 libcups2t64 libasound2t64 \ | |
| libatspi2.0-0t64 libglib2.0-0t64 libgtk-3-0t64 \ | |
| $common | |
| else | |
| sudo apt-get install -y \ | |
| libatk1.0-0 libatk-bridge2.0-0 libcups2 libasound2 \ | |
| libatspi2.0-0 libglib2.0-0 libgtk-3-0 \ | |
| $common | |
| fi | |
| - run: npm ci | |
| - run: npm test | |
| - run: npm version ${TAG_NAME} --git-tag-version=false | |
| env: | |
| TAG_NAME: ${{ github.event.release.tag_name }} | |
| - run: npm --ignore-scripts publish --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |