chore: bump eslint-plugin-import from 2.28.1 to 2.29.0 #1133
Workflow file for this run
This file contains 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
# This file is automatically added by @npmcli/template-oss. Do not edit. | |
name: Publish | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
workflow_call: | |
jobs: | |
build-and-upload: | |
permissions: | |
contents: read | |
pages: read | |
name: Build and Upload | |
if: github.repository_owner == 'npm' | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Git User | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "npm CLI robot" | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
id: node | |
with: | |
node-version: 18.x | |
check-latest: contains('18.x', '.x') | |
cache: npm | |
# node 10/12/14 ship with npm@6, which is known to fail when updating itself in windows | |
- name: Update Windows npm | |
if: | | |
matrix.platform.os == 'windows-latest' && ( | |
startsWith(steps.node.outputs.node-version, 'v10.') || startsWith(steps.node.outputs.node-version, 'v12.') || startsWith(steps.node.outputs.node-version, 'v14.') | |
) | |
run: | | |
curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz | |
tar xf npm-7.5.4.tgz | |
cd package | |
node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz | |
cd .. | |
rmdir /s /q package | |
# Start on Node 10 because we dont test on anything lower | |
- name: Install npm@7 on Node 10 | |
shell: bash | |
if: startsWith(steps.node.outputs.node-version, 'v10.') | |
id: npm-7 | |
run: | | |
npm i --prefer-online --no-fund --no-audit -g npm@7 | |
echo "updated=true" >> "$GITHUB_OUTPUT" | |
- name: Install npm@8 on Node 12 | |
shell: bash | |
if: startsWith(steps.node.outputs.node-version, 'v12.') | |
id: npm-8 | |
run: | | |
npm i --prefer-online --no-fund --no-audit -g npm@8 | |
echo "updated=true" >> "$GITHUB_OUTPUT" | |
- name: Install npm@9 on Node 14/16/18.0 | |
shell: bash | |
if: startsWith(steps.node.outputs.node-version, 'v14.') || startsWith(steps.node.outputs.node-version, 'v16.') || startsWith(steps.node.outputs.node-version, 'v18.0.') | |
id: npm-9 | |
run: | | |
npm i --prefer-online --no-fund --no-audit -g npm@9 | |
echo "updated=true" >> "$GITHUB_OUTPUT" | |
- name: Install npm@latest on Node | |
if: ${{ !(steps.npm-7.outputs.updated || steps.npm-8.outputs.updated || steps.npm-9.outputs.updated) }} | |
run: npm i --prefer-online --no-fund --no-audit -g npm@latest | |
- name: npm Version | |
run: npm -v | |
- name: Install Dependencies | |
run: npm i --no-audit --no-fund | |
- name: Rebuild deps | |
run: npm rebuild | |
- name: Setup Pages | |
uses: actions/configure-pages@v1 | |
- name: Restore cache | |
id: cache-gatsby | |
uses: actions/cache/restore@v3 | |
with: | |
key: ${{ runner.os }}-gatsby-${{ github.ref_name }} | |
path: | | |
public | |
.cache | |
- name: Build documentation | |
run: npm run build | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Save cache | |
uses: actions/cache/save@v3 | |
with: | |
key: ${{ steps.cache-gatsby.outputs.cache-primary-key }} | |
path: | | |
public | |
.cache | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: './public' | |
deploy: | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build-and-upload | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 | |
with: | |
preview: ${{ github.event_name == 'pull_request' }} |