Skip to content
Merged
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
4 changes: 4 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"snapshot": {
"useCalculatedVersion": true,
"prereleaseTemplate": "{tag}.v{datetime}"
},
"ignore": []
}
2 changes: 2 additions & 0 deletions .changeset/wide-regions-decide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
89 changes: 89 additions & 0 deletions .github/workflows/release-canary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Canary Release

on:
push:
branches:
- main
tags-ignore:
- '*'

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
# Check if we should publish canary versions
check:
name: Check for publishable changes
runs-on: ubuntu-latest
outputs:
has_changes: ${{ steps.changeset.outputs.hasChangesets }}

steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22

- name: Check for changesets
id: changeset
run: |
if find .changeset -name "*.md" -not -name "README.md" | grep -q .; then
echo "hasChangesets=true" >> $GITHUB_OUTPUT
echo "Changesets found, will publish canary versions"
else
echo "hasChangesets=false" >> $GITHUB_OUTPUT
echo "No changesets found, skipping canary release"
fi

# Publish canary versions if we have changes
canary-release:
name: Canary Release
needs: check
if: needs.check.outputs.has_changes == 'true'
runs-on: ubuntu-latest

permissions:
contents: write
id-token: write
packages: write
pull-requests: write
issues: read
statuses: write
checks: write

steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: pnpm install

- name: Version packages for canary
id: version-packages
run: pnpm version-packages:canary

- name: Build release
run: pnpm build

- name: Canary release
run: pnpm release:canary
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,26 @@
1. [Sign up for an account.](https://app.spur.us/sign-up?utm_soure=github&utm_medium=spur_js_repo_readme)
2. Create a Monocle application.

## Packages

Our packages are available on npm under the `@spur.us` namespace.

### Stable Releases

Install the latest stable release:

```bash
npm install @spur.us/package-name
```

### Canary Releases

For testing the latest features, you can use our canary releases:

```bash
npm install @spur.us/package-name@canary
```

## Contributing

We welcome all contributors!
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
"lint": "turbo run lint",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"release": "changeset publish && git push --follow-tags",
"release:canary": "changeset publish --tag canary",
"test": "turbo run test",
"version-packages": "changeset version && pnpm install --lockfile-only --engine-strict=false",
"version-packages:canary": "changeset version --snapshot canary",
"yalc:all": "for d in packages/*/; do echo $d; cd $d; pnpm yalc push --replace --sig; cd '../../'; done"
},
"devDependencies": {
Expand Down