diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index dd69c79..14f3abf 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,4 +1 @@ -# Lines starting with '#' are comments. -# Each line is a file pattern followed by one or more owners. - -* @MetaMask/snaps-devs +* @xmtp/web diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 428effa..fd780b9 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -6,26 +6,70 @@ on: pull_request: jobs: - build-lint-test: - name: Build, Lint, and Test - runs-on: ubuntu-20.04 - strategy: - matrix: - node-version: [18.x] + prettier: + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node-version }} - - run: npm ci - - run: npm run build - - run: npm run lint - - run: npm run test - all-jobs-pass: - name: All jobs pass - runs-on: ubuntu-20.04 - needs: - - build-lint-test + node-version-file: ".nvmrc" + cache: "yarn" + env: + SKIP_YARN_COREPACK_CHECK: "1" + - name: Enable corepack + run: corepack enable + - name: Install dependencies + run: yarn + - name: Check code format + run: yarn format:check + + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + cache: "yarn" + env: + SKIP_YARN_COREPACK_CHECK: "1" + - name: Enable corepack + run: corepack enable + - name: Install dependencies + run: yarn + - name: Lint + run: yarn lint + + test: + runs-on: ubuntu-latest steps: - - run: echo "Great success!" + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + cache: "yarn" + env: + SKIP_YARN_COREPACK_CHECK: "1" + - name: Enable corepack + run: corepack enable + - name: Install dependencies + run: yarn + - name: Run tests + run: yarn test + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + cache: "yarn" + env: + SKIP_YARN_COREPACK_CHECK: "1" + - name: Enable corepack + run: corepack enable + - name: Install dependencies + run: yarn + - name: Build + run: yarn build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 34a9026..4fd4cdd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,22 +15,23 @@ jobs: issues: write steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' - - name: Use latest NPM - # Ensure we are using the latest version of NPM to get support for provenance - run: npm i -g npm + cache: 'yarn' + env: + SKIP_YARN_COREPACK_CHECK: "1" + - name: Enable corepack + run: corepack enable - name: Install dependencies - working-directory: packages/snap - run: npm ci + run: yarn - name: Release working-directory: packages/snap env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: npx semantic-release + run: yarn dlx semantic-release