Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .changeset/README.md

This file was deleted.

11 changes: 0 additions & 11 deletions .changeset/config.json

This file was deleted.

15 changes: 10 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,15 @@ jobs:
NODE_OPTIONS: "--max_old_space_size=8192"

steps:
- uses: actions/checkout@v4

- uses: jdx/mise-action@v2

- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5

- name: Install mise
run: |
curl https://mise.run | MISE_VERSION=v2026.5.6 sh
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
echo "$HOME/.local/share/mise/shims" >> "$GITHUB_PATH"
export PATH="$HOME/.local/bin:$HOME/.local/share/mise/shims:$PATH"
mise install
Comment thread
petar-omni marked this conversation as resolved.
- run: pnpm install --frozen-lockfile

- run: pnpm -F @stakekit/widget exec playwright install
Expand All @@ -32,4 +37,4 @@ jobs:

- run: pnpm lint

- run: pnpm test
- run: pnpm test
77 changes: 60 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,40 +13,83 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
id-token: write

environment: production
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_OPTIONS: "--max_old_space_size=8192"
PACKAGE_DIR: packages/widget

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: jdx/mise-action@v2
- name: Install mise
run: |
curl https://mise.run | MISE_VERSION=v2026.5.6 sh
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
echo "$HOME/.local/share/mise/shims" >> "$GITHUB_PATH"
export PATH="$HOME/.local/bin:$HOME/.local/share/mise/shims:$PATH"
mise install
Comment thread
petar-omni marked this conversation as resolved.

# npm 11.5.1 or later is required for trusted publishing
- name: Update npm
run: npm install -g npm@latest

- name: Fix executable files for changesets
- run: pnpm install --frozen-lockfile

- name: Create GitHub release
run: >
pnpm exec release-please github-release
--token="$GITHUB_TOKEN"
--repo-url="$GITHUB_REPOSITORY"
--target-branch="$GITHUB_REF_NAME"

- name: Check npm publish status
id: publish
shell: bash
run: |
chmod -x .husky/commit-msg
package_name=$(node -p "require('./${PACKAGE_DIR}/package.json').name")
version=$(node -p "require('./${PACKAGE_DIR}/package.json').version")
tag="${package_name}@${version}"

- run: pnpm install --frozen-lockfile
{
echo "package_name=${package_name}"
echo "version=${version}"
echo "tag=${tag}"
} >> "$GITHUB_OUTPUT"

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: pnpm run release
version: pnpm run version
commit: "ci(changesets): version packages"
title: "ci(changesets): version packages"
commitMode: github-api
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Use OIDC for npm authentication instead of NPM_TOKEN
NPM_TOKEN: "" # https://github.com/changesets/changesets/issues/1152#issuecomment-3190884868
if ! gh release view "$tag" --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then
echo "No GitHub release found for ${tag}; skipping npm publish."
echo "should_publish=false" >> "$GITHUB_OUTPUT"
exit 0
fi

if npm view "${package_name}@${version}" version >/dev/null 2>&1; then
echo "${package_name}@${version} is already published; skipping npm publish."
echo "should_publish=false" >> "$GITHUB_OUTPUT"
exit 0
fi

echo "should_publish=true" >> "$GITHUB_OUTPUT"

- name: Create or update release pull request
run: >
pnpm exec release-please release-pr
--token="$GITHUB_TOKEN"
--repo-url="$GITHUB_REPOSITORY"
--target-branch="$GITHUB_REF_NAME"

- name: Publish to npm
if: steps.publish.outputs.should_publish == 'true'
run: |
tag="${{ steps.publish.outputs.tag }}"
git fetch --force origin "refs/tags/${tag}:refs/tags/${tag}"
git checkout --detach "$tag"
pnpm install --frozen-lockfile
pnpm exec turbo --filter=@stakekit/widget build
npm publish "$PACKAGE_DIR"
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -266,4 +266,6 @@ next-env.d.ts
*.p12
*.pfx
*.crt
*.cer
*.cer

.pnpm-store
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"packages/widget": "0.0.270"
}
22 changes: 22 additions & 0 deletions amplify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: 1
frontend:
phases:
preBuild:
commands:
- curl https://mise.run | MISE_VERSION=v2026.5.6 sh
Comment thread
petar-omni marked this conversation as resolved.
- export PATH="$HOME/.local/bin:$PATH"
- export PATH="$HOME/.local/share/mise/shims:$PATH"
- mise install
- pnpm install --frozen-lockfile
- echo "VITE_YIELDS_API_URL=$VITE_YIELDS_API_URL" >> packages/widget/.env
- echo "VITE_API_URL=$VITE_API_URL" >> packages/widget/.env
- echo "VITE_API_KEY=$VITE_API_KEY" >> packages/widget/.env
Comment thread
petar-omni marked this conversation as resolved.

build:
commands:
- pnpm --filter=@stakekit/widget build:website

artifacts:
baseDirectory: packages/widget/dist/website
files:
- "**/*"
37 changes: 37 additions & 0 deletions mise.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# @generated - this file is auto-generated by `mise lock` https://mise.en.dev/dev-tools/mise-lock.html

[[tools.node]]
version = "24.15.0"
backend = "core:node"

[tools.node."platforms.linux-arm64"]
checksum = "sha256:73afc234d558c24919875f51c2d1ea002a2ada4ea6f83601a383869fefa64eed"
url = "https://nodejs.org/dist/v24.15.0/node-v24.15.0-linux-arm64.tar.gz"

[tools.node."platforms.linux-arm64-musl"]
checksum = "sha256:31e98aa960a067da91edffd5d93bc46657b5d2a8029612c359f5f2ac0060152a"
url = "https://unofficial-builds.nodejs.org/download/release/v24.15.0/node-v24.15.0-linux-arm64-musl.tar.gz"

[tools.node."platforms.linux-x64"]
checksum = "sha256:44836872d9aec49f1e6b52a9a922872db9a2b02d235a616a5681b6a85fec8d89"
url = "https://nodejs.org/dist/v24.15.0/node-v24.15.0-linux-x64.tar.gz"

[tools.node."platforms.linux-x64-musl"]
checksum = "sha256:f55af5bd489c5347b113ca6594cae00a54b30ba57ac5875324311bfc6f4762e3"
url = "https://unofficial-builds.nodejs.org/download/release/v24.15.0/node-v24.15.0-linux-x64-musl.tar.gz"

[tools.node."platforms.macos-arm64"]
checksum = "sha256:372331b969779ab5d15b949884fc6eaf88d5afe87bde8ba881d6400b9100ffc4"
url = "https://nodejs.org/dist/v24.15.0/node-v24.15.0-darwin-arm64.tar.gz"

[tools.node."platforms.macos-x64"]
checksum = "sha256:ffd5ee293467927f3ee731a553eb88fd1f48cf74eebc2d74a6babe4af228673b"
url = "https://nodejs.org/dist/v24.15.0/node-v24.15.0-darwin-x64.tar.gz"

[tools.node."platforms.windows-x64"]
checksum = "sha256:cc5149eabd53779ce1e7bdc5401643622d0c7e6800ade18928a767e940bb0e62"
url = "https://nodejs.org/dist/v24.15.0/node-v24.15.0-win-x64.zip"

[[tools."npm:pnpm"]]
version = "10.33.2"
backend = "npm:pnpm"
4 changes: 2 additions & 2 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[tools]
node = "22"
pnpm = "10"
node = "24.15.0"
"npm:pnpm" = "10.33.2"
9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,17 @@
"format": "turbo run format",
"clean": "turbo run clean",
"prepare": "husky",
"check-unused": "npx knip",
"release": "turbo --filter=@stakekit/widget build && changeset publish",
"version": "changeset version"
"check-unused": "npx knip"
},
"devDependencies": {
"@biomejs/biome": "^2.3.8",
"@changesets/cli": "^2.29.8",
"@commitlint/cli": "^20.2.0",
"@commitlint/config-conventional": "^20.2.0",
"husky": "^9.1.7",
"knip": "^5.73.4",
"turbo": "^2.6.3"
"turbo": "^2.6.3",
"release-please": "^17.6.0"
},
"packageManager": "pnpm@10.24.0",
"pnpm": {
"overrides": {
"@types/react": "19.0.10",
Expand Down
Loading
Loading