feat: implement EIP-6963 support #2204
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: Check PR | |
on: | |
pull_request: | |
types: [opened, reopened, synchronize, labeled] | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Prepare | |
uses: ./.github/actions/prepare | |
- name: Checking Conventional Commits | |
run: node ./scripts/check-conventional-commits/command.mjs | |
env: | |
REF: ${{ github.ref }} | |
- name: Test | |
run: | | |
node ./scripts/build-libs/command.mjs | |
yarn run test | |
# for preview deployment for specific project, add vercel project id in environment section | |
- name: Preview Deployment | |
id: deploy | |
run: | | |
yarn global add vercel | |
yarn run deploy | |
env: | |
REF: ${{ github.ref }} | |
GH_TOKEN: ${{ github.token }} | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | |
VERCEL_PROJECT_WIDGET_CONFIG: ${{ secrets.VERCEL_PROJECT_WIDGET_CONFIG }} # widget playground | |
VERCEL_PROJECT_WIDGET_APP: ${{ secrets.VERCEL_PROJECT_WIDGET_APP }} # widget app | |
VERCEL_PROJECT_STORYBOOK: ${{ secrets.VERCEL_PROJECT_STORYBOOK }} # storybook | |
ENABLE_PREVIEW_DEPLOY: true | |
outputs: | |
# the structure of output variable is {packageNameWithoutScope}-url like: widget-app-url | |
app_url: ${{ steps.deploy.outputs.widget-app-url }} | |
playground_url: ${{ steps.deploy.outputs.widget-playground-url }} | |
storybook_url: ${{ steps.deploy.outputs.storybook-url }} | |
# add job for each project that you want has preview deployment | |
app-preview: | |
runs-on: ubuntu-latest | |
needs: check | |
environment: | |
name: app-preview | |
url: ${{ steps.seturl.outputs.url }} | |
steps: | |
- name: Extract Preview URL | |
id: seturl | |
run: | | |
echo "url=${{ needs.check.outputs.app_url }}">> $GITHUB_OUTPUT | |
echo "Preview URL: ${{ needs.check.outputs.app_url}}" | |
playground-preview: | |
runs-on: ubuntu-latest | |
needs: check | |
environment: | |
name: playground-preview | |
url: ${{ steps.seturl.outputs.url }} | |
steps: | |
- name: Extract Preview URL | |
id: seturl | |
run: | | |
echo "url=${{ needs.check.outputs.playground_url }}">> $GITHUB_OUTPUT | |
echo "Preview URL: ${{ needs.check.outputs.playground_url}}" | |
storybook-preview: | |
runs-on: ubuntu-latest | |
needs: check | |
environment: | |
name: storybook-preview | |
url: ${{ steps.seturl.outputs.url }} | |
steps: | |
- name: Extract Preview URL | |
id: seturl | |
run: | | |
echo "url=${{ needs.check.outputs.storybook_url }}">> $GITHUB_OUTPUT | |
echo "Preview URL: ${{ needs.check.outputs.storybook_url}}" |