Skip to content

chore: updates kado list #2639

chore: updates kado list

chore: updates kado list #2639

name: Run build, test & publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }}
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
on:
workflow_dispatch:
push:
branches:
- develop
- beta
- nightly
pull_request:
branches:
- develop
jobs:
build-lint-test:
if: contains(github.event.pull_request.title, ':tada:') == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Repo
uses: ./tools/github/setup-repo
- name: Build
run: bun install; bun run build
- name: Lint Packages
run: |
bun --filter='./packages/toolboxes/**' lint && bun --filter='./packages/toolboxes/**' type-check
bun --filter='./packages/wallets/**' lint && bun --filter='./packages/wallets/**' type-check
bun --filter='./packages/plugins/**' lint && bun --filter='./packages/plugins/**' type-check
bun --filter='./packages/swapkit/**' lint && bun --filter='./packages/swapkit/**' type-check
- name: Lint Playgrounds
continue-on-error: true
run: bun --filter='./playgrounds/**' lint && bun --filter='./playgrounds/**' type-check
- name: Test
if: contains(github.ref_name, 'nightly') == false
run: bun run test
publish:
if: contains(github.ref_name, 'develop') || contains(github.ref_name, 'nightly') || contains(github.ref_name, 'beta')
needs: [build-lint-test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Repo
uses: ./tools/github/setup-repo
- name: Replace versions
run: bun run ./scripts/replace-versions.ts
- name: Copy npmrc config
run: cp .npmrc.prod .npmrc
- name: Change nightly changeset
if: contains(github.ref_name, 'nightly')
run: |
bun changeset version --snapshot nightly
- name: Change beta changeset
if: contains(github.ref_name, 'beta')
run: |
echo 'publishName="Beta"' >> $GITHUB_OUTPUT
bun changeset pre enter beta
bun changeset version
- name: Set job params
shell: bash
id: deployment-params
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
echo "publishName=${{ github.ref_name == 'develop' && 'Release' || github.ref_name }}" >> $GITHUB_OUTPUT
- name: Create Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
if: contains(github.ref_name, 'develop')
with:
title: ":tada: Publish ${{ steps.deployment-params.outputs.publishName }}"
version: bun version-bump
publish: bun publish-packages
setupGitUser: false
- name: Publish Nightly to npm
uses: changesets/action@v1
if: contains(github.ref_name, 'nightly')
with:
title: ":tada: Publish Nightly"
version: bun version-bump
publish: bun publish-packages --tag nightly
setupGitUser: false
deploy-playground:
if: contains(github.ref_name, 'develop')
needs: [build-lint-test]
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
steps:
- uses: actions/checkout@v4
- name: Setup Repo
uses: ./tools/github/setup-repo
- name: Setup Pages
uses: actions/[email protected]
- name: Build playground
run: |
bun run build
bun playground:vite build-playground
- name: Upload artifact
uses: actions/[email protected]
with:
path: "./playgrounds/vite/dist"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/[email protected]