Update deposit and withdraw memo #2147
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: 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-and-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: Test | |
run: bun run test | |
- name: Lint | |
run: bun lint | |
publish: | |
if: contains(github.ref_name, 'develop') || contains(github.ref_name, 'develop') || contains(github.ref_name, 'nightly') || contains(github.ref_name, 'beta') | |
needs: [build-and-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-and-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/configure-pages@v5.0.0 | |
- name: Build playground | |
run: | | |
bun run build | |
bun playground:vite build-playground | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3.0.1 | |
with: | |
path: "./playgrounds/vite/dist" | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4.0.5 |