Initial commit#2
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub. |
|
Caution MetaMask internal reviewing guidelines:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name: Prepare | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| node-version: [18.x, 20.x, 22.x] | ||
| steps: | ||
| - name: Checkout and setup environment | ||
| uses: MetaMask/action-checkout-and-setup@v1 | ||
| with: | ||
| is-high-risk-environment: false | ||
| node-version: ${{ matrix.node-version }} | ||
| cache-node-modules: ${{ matrix.node-version == '22.x' }} | ||
|
|
||
| build: |
| name: Build | ||
| needs: prepare | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| node-version: [22.x] | ||
| steps: | ||
| - name: Checkout and setup environment | ||
| uses: MetaMask/action-checkout-and-setup@v1 | ||
| with: | ||
| is-high-risk-environment: false | ||
| node-version: ${{ matrix.node-version }} | ||
| - run: yarn build | ||
| - name: Require clean working directory | ||
| shell: bash | ||
| run: | | ||
| if ! git diff --exit-code; then | ||
| echo "Working tree dirty at end of job" | ||
| exit 1 | ||
| fi | ||
|
|
||
| lint: |
| name: Lint | ||
| needs: prepare | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| node-version: [22.x] | ||
| steps: | ||
| - name: Checkout and setup environment | ||
| uses: MetaMask/action-checkout-and-setup@v1 | ||
| with: | ||
| is-high-risk-environment: false | ||
| node-version: ${{ matrix.node-version }} | ||
| - run: yarn lint | ||
| - name: Validate RC changelog | ||
| if: ${{ startsWith(github.head_ref, 'release/') }} | ||
| run: yarn lint:changelog --rc | ||
| - name: Validate changelog | ||
| if: ${{ !startsWith(github.head_ref, 'release/') }} | ||
| run: yarn lint:changelog | ||
| - name: Require clean working directory | ||
| shell: bash | ||
| run: | | ||
| if ! git diff --exit-code; then | ||
| echo "Working tree dirty at end of job" | ||
| exit 1 | ||
| fi | ||
|
|
||
| test: |
| name: Test | ||
| needs: prepare | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| node-version: [18.x, 20.x, 22.x] | ||
| steps: | ||
| - name: Checkout and setup environment | ||
| uses: MetaMask/action-checkout-and-setup@v1 | ||
| with: | ||
| is-high-risk-environment: false | ||
| node-version: ${{ matrix.node-version }} | ||
| - run: yarn test | ||
| - name: Require clean working directory | ||
| shell: bash | ||
| run: | | ||
| if ! git diff --exit-code; then | ||
| echo "Working tree dirty at end of job" | ||
| exit 1 | ||
| fi | ||
|
|
||
| compatibility-test: |
| name: Compatibility test | ||
| needs: prepare | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| node-version: [18.x, 20.x, 22.x] | ||
| steps: | ||
| - name: Checkout and setup environment | ||
| uses: MetaMask/action-checkout-and-setup@v1 | ||
| with: | ||
| is-high-risk-environment: false | ||
| node-version: ${{ matrix.node-version }} | ||
| - name: Install dependencies via Yarn | ||
| run: rm yarn.lock && YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn | ||
| - run: yarn test | ||
| - name: Restore lockfile | ||
| run: git restore yarn.lock | ||
| - name: Require clean working directory | ||
| shell: bash | ||
| run: | | ||
| if ! git diff --exit-code; then | ||
| echo "Working tree dirty at end of job" | ||
| exit 1 | ||
| fi |
| if: github.event_name == 'push' && startsWith(github.event.head_commit.author.name, 'github-actions') | ||
| needs: all-jobs-pass | ||
| outputs: | ||
| IS_RELEASE: ${{ steps.is-release.outputs.IS_RELEASE }} | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: MetaMask/action-is-release@v1 | ||
| id: is-release | ||
|
|
||
| publish-release: |
| name: Get release version | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| release-version: ${{ steps.release-name.outputs.RELEASE_VERSION }} | ||
| steps: | ||
| - name: Extract release version from branch name | ||
| id: release-name | ||
| run: | | ||
| BRANCH_NAME='${{ github.ref_name }}' | ||
| echo "RELEASE_VERSION=v${BRANCH_NAME#release/}" >> "$GITHUB_OUTPUT" | ||
| publish-to-gh-pages: |
| needs: publish-release | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout and setup environment | ||
| uses: MetaMask/action-checkout-and-setup@v1 | ||
| with: | ||
| is-high-risk-environment: true | ||
| ref: ${{ github.sha }} | ||
| - name: Restore build artifacts | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: publish-release-artifacts-${{ github.sha }} | ||
| - name: Dry Run Publish | ||
| # omit npm-token token to perform dry run publish | ||
| uses: MetaMask/action-npm-publish@v5 | ||
| with: | ||
| slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
| subteam: S042S7RE4AE # @metamask-npm-publishers | ||
| env: | ||
| SKIP_PREPACK: true | ||
|
|
||
| publish-npm: |
| needs: publish-npm-dry-run | ||
| runs-on: ubuntu-latest | ||
| environment: npm-publish | ||
| steps: | ||
| - name: Checkout and setup environment | ||
| uses: MetaMask/action-checkout-and-setup@v1 | ||
| with: | ||
| is-high-risk-environment: true | ||
| ref: ${{ github.sha }} | ||
| - name: Restore build artifacts | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: publish-release-artifacts-${{ github.sha }} | ||
| - name: Publish | ||
| uses: MetaMask/action-npm-publish@v5 | ||
| with: | ||
| # This `NPM_TOKEN` needs to be manually set per-repository. | ||
| # Look in the repository settings under "Environments", and set this token in the `npm-publish` environment. | ||
| npm-token: ${{ secrets.NPM_TOKEN }} | ||
| env: | ||
| SKIP_PREPACK: true | ||
|
|
||
| get-release-version: |
| needs: publish-npm | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| RELEASE_VERSION: ${{ steps.get-release-version.outputs.RELEASE_VERSION }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.sha }} | ||
| - id: get-release-version | ||
| shell: bash | ||
| run: ./scripts/get.sh ".version" "RELEASE_VERSION" | ||
|
|
||
| publish-release-to-gh-pages: |
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
No description provided.