2d8a41b18b
* Denormalize run tags, increase character limit to 128 * WIP realtime subscribing to runs * extracted the stream stuff into core, made it more reusable * WIP tags * Remove tags for now because it’s not support in electric * Support async iterables, readable stream, and callback style subscription styles * Remove tags streaming endpoint * Add realtime rate limits and scope them to the /realtime path * WIP rate limt per org * Introduce per org rate limits * WIP JWT auth * Move migrations into new internal db package * Resolve pnpm lock file * Authenticating to the realtime API with JWTs are working * realtime in the client * Created react-hooks package and starting to move stuff in there * Improve types for hooks * schema tasks * Added useBatch hook * build uploadthing/fal demo and change how run metadata is synced to the server * tweaks * WIL realtime concurrency tracking * Implement test for realtime client using testcontainers also updated electric to latest version * Allow customizing the expiration time of the automatic JWT created after triggering a task * Add support for subscribing to run tags * Improve auth types and API * finalize the realtime API * Fixed some example stuff * Allow up to 10 run tags * Remove core from docker-provider tsconfig paths to prevent it from being typechecked * do the same for the kubernetes provider * Fixing some typecheck errors * Fix webapp type errors * Update @trigger.dev/platform to 1.0.13 * Fix attw error * Remove from/to in subscribeToRuns query params * Add tests for the rate limit middleware and add custom JWT rate limits * turn off webapp test parallelism * Finish renaming jwt -> publicAccessToken and automatically give the JWT read access to the tags when using trigger * Add changeset * Attempt to fix unit tests in CI * Skip running the auth rate limit middleware tests for now * Try a beefier machine * Try and run webapp tests separately * Setup env vars * Make sliding window test more reliabile
102 lines
3.3 KiB
YAML
102 lines
3.3 KiB
YAML
name: 🦋 Changesets Release
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths-ignore:
|
|
- "docs/**"
|
|
- "**.md"
|
|
- ".github/CODEOWNERS"
|
|
- ".github/ISSUE_TEMPLATE/**"
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
release:
|
|
name: 🦋 Changesets Release
|
|
runs-on: ubuntu-latest
|
|
if: github.repository == 'triggerdotdev/trigger.dev'
|
|
outputs:
|
|
published: ${{ steps.changesets.outputs.published }}
|
|
published_packages: ${{ steps.changesets.outputs.publishedPackages }}
|
|
published_package_version: ${{ steps.get_version.outputs.package_version }}
|
|
steps:
|
|
- name: ⬇️ Checkout repo
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: ⎔ Setup pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 8.15.5
|
|
|
|
- name: ⎔ Setup node
|
|
uses: buildjet/setup-node@v4
|
|
with:
|
|
node-version: 20.11.1
|
|
cache: "pnpm"
|
|
|
|
- name: 📥 Download deps
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: 📀 Generate Prisma Client
|
|
run: pnpm run generate
|
|
|
|
- name: 🏗️ Build
|
|
run: pnpm run build --filter "@trigger.dev/*" --filter "trigger.dev"
|
|
|
|
- name: 🔎 Type check
|
|
run: pnpm run typecheck --filter "@trigger.dev/*" --filter "trigger.dev"
|
|
|
|
- name: 🔐 Setup npm auth
|
|
run: |
|
|
echo "registry=https://registry.npmjs.org" >> ~/.npmrc
|
|
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc
|
|
|
|
# This action has two responsibilities. The first time the workflow runs
|
|
# (initial push to the `main` branch) it will create a new branch and
|
|
# then open a PR with the related changes for the new version. After the
|
|
# PR is merged, the workflow will run again and this action will build +
|
|
# publish to npm.
|
|
- name: 🚀 PR / Publish
|
|
if: ${{ !env.ACT }}
|
|
id: changesets
|
|
uses: changesets/action@v1
|
|
with:
|
|
version: pnpm run changeset:version
|
|
commit: "chore: Update version for release"
|
|
title: "chore: Update version for release"
|
|
publish: pnpm run changeset:release
|
|
createGithubReleases: true
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
|
|
# - name: 🚀 PR / Publish (mock)
|
|
# if: ${{ env.ACT }}
|
|
# id: changesets
|
|
# run: |
|
|
# echo "published=true" >> "$GITHUB_OUTPUT"
|
|
# echo "publishedPackages=[{\"name\": \"@xx/xx\", \"version\": \"1.2.0\"}, {\"name\": \"@xx/xy\", \"version\": \"0.8.9\"}]" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: 📦 Get package version
|
|
if: steps.changesets.outputs.published == 'true'
|
|
id: get_version
|
|
run: |
|
|
package_version=$(echo '${{ steps.changesets.outputs.publishedPackages }}' | jq -r '.[0].version')
|
|
echo "package_version=${package_version}" >> "$GITHUB_OUTPUT"
|
|
|
|
publish:
|
|
needs: release
|
|
uses: ./.github/workflows/publish.yml
|
|
secrets: inherit
|
|
# if: needs.release.outputs.published == 'true'
|
|
# disable automatic publishing for now
|
|
if: false
|
|
with:
|
|
image_tag: v${{ needs.release.outputs.published_package_version }}
|