This repository has been archived by the owner on Dec 3, 2024. It is now read-only.
chore: prepare for release/whitelist #795
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
name: ci | |
# This workflow is triggered on pushes to the repository. | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- '**' | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
cache: yarn | |
node-version: '18' | |
- run: corepack enable | |
- name: Install deps | |
run: yarn --immutable | |
- name: Build | |
run: yarn build | |
- uses: tj-actions/verify-changed-files@v9 | |
id: verify-changed-files | |
with: | |
files: | | |
packages/snap/snap.manifest.json | |
- name: Check if snap manifest updated | |
if: steps.verify-changed-files.outputs.files_changed == 'true' | |
run: | | |
echo "Snap manifest not updated: ${{ steps.verify-changed-files.outputs.changed_files }}" | |
exit 1 | |
lint: | |
needs: build | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
cache: 'yarn' | |
- run: corepack enable | |
- name: Install deps | |
run: yarn --immutable | |
- name: Build | |
run: yarn build | |
- name: Lint | |
run: yarn run lint | |
tests: | |
needs: lint | |
name: Tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
cache: 'yarn' | |
- run: corepack enable | |
- name: Install | |
run: yarn --immutable | |
- name: Build | |
run: yarn build | |
- name: "Unit Tests" | |
run: 'yarn run test:unit' | |
page: | |
needs: build | |
name: Cloudflare Pages | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
cache: yarn | |
node-version: '18.x' | |
- run: corepack enable | |
- name: Install | |
run: yarn install --immutable | |
- name: Build | |
run: yarn build | |
env: | |
REACT_APP_SNAP_ID: 'npm:@chainsafe/polkadot-snap' | |
- name: Publish to Cloudflare Pages | |
uses: cloudflare/pages-action@v1 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: 2238a825c5aca59233eab1f221f7aefb | |
projectName: metamask-snap-polkadot | |
directory: ./packages/example/build | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.head_ref || github.ref_name }} |