chore(main): release 2.9.1 #2625
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: NPM Publish simulation | |
| on: | |
| pull_request: | |
| # No GITHUB_TOKEN permissions, as we only use it to increase API limit. | |
| permissions: {} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: (mdn/fred) Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| path: mdn/fred | |
| persist-credentials: false | |
| - name: (mdn/fred) Setup Node.js | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version-file: mdn/fred/.nvmrc | |
| cache: npm | |
| cache-dependency-path: mdn/fred/package-lock.json | |
| - name: (mdn/fred) Install all npm packages | |
| working-directory: mdn/fred | |
| run: npm ci | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: (mdn/fred) Build tarball | |
| id: build | |
| working-directory: mdn/fred | |
| run: | | |
| npm pkg set _gitSha=${{ github.sha }} | |
| npm pack | |
| TARBALL=`ls mdn-fred-*.tgz` | |
| echo $TARBALL | |
| ls -lh $TARBALL | |
| echo "tarball=$TARBALL" >> "$GITHUB_OUTPUT" | |
| - name: (mdn/fred) archive tarball | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: tarball | |
| path: mdn/fred/${{ steps.build.outputs.tarball }} | |
| compression-level: 0 # file already compressed | |
| test: | |
| needs: build | |
| strategy: | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - macos-latest | |
| - windows-latest | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: "Move npm cache to D: drive" | |
| if: runner.os == 'Windows' | |
| run: echo "npm_config_cache=D:\npm-cache" >> $env:GITHUB_ENV | |
| - name: (mdn/content) Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| repository: mdn/content | |
| path: mdn/content | |
| persist-credentials: false | |
| - name: (mdn/content) Setup Node.js | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version-file: mdn/content/.nvmrc | |
| cache: npm | |
| cache-dependency-path: mdn/content/package-lock.json | |
| - name: (mdn/content) Download tarball | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: tarball | |
| - name: (mdn/content) Install tarball | |
| working-directory: mdn/content | |
| shell: bash | |
| run: | | |
| TARBALL=$(ls ../../mdn-fred-*.tgz) | |
| npm install file:$TARBALL | |
| npm install | |
| env: | |
| # Increase GitHub API limit. | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: (mdn/content) Verify correct fred installed | |
| working-directory: mdn/content/node_modules/@mdn/fred | |
| shell: bash | |
| run: test "$(npm pkg get _gitSha --json)" = '"${{ github.sha }}"' | |
| - name: (mdn/content) Render (Linux) | |
| if: runner.os == 'Linux' | |
| working-directory: mdn/content | |
| run: npx @mdn/fred ssr | |
| - name: (mdn/fred) Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| path: mdn/fred | |
| persist-credentials: false | |
| - name: (mdn/fred) Setup Node.js | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version-file: mdn/fred/.nvmrc | |
| cache: npm | |
| cache-dependency-path: mdn/fred/package-lock.json | |
| - name: (mdn/fred) Install all npm packages | |
| working-directory: mdn/fred | |
| run: npm ci | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: (mdn/fred) Run tests | |
| id: build | |
| working-directory: mdn/fred | |
| env: | |
| FRED_PORT: 5042 | |
| # Increase GitHub API limit. | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| npm test -- e2e --content ../content |