-
Notifications
You must be signed in to change notification settings - Fork 74
ci: add turbo and release workflow #184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
cabljac
wants to merge
15
commits into
main
Choose a base branch
from
release-workflow
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
d11f08d
ci: add turbo and intial run at release workflows
cabljac 21d2778
ci: fix tests running from root with turbo
cabljac ac430fd
fix: revert use client decorator in package
cabljac a23e194
chore: bump pnpm version
cabljac fc2687c
chore: format
cabljac 7da6c0b
chore: update format script references
cabljac d28c017
chore: update format in test workflow yaml
cabljac 51cc461
chore: improve test commands
cabljac 052082b
chore: add changeset for release workflow improvements
cabljac a2e65cb
chore: fix format and build CI
cabljac 1fc2914
chore(ci): fix format CI
cabljac 2708785
chore(ci): add firebase emulator install step
cabljac 233afa0
chore: fix CONTRIBUTING.md script reference
cabljac c8fb259
fix: update CONTRIBUTING and scripts according to review
cabljac b0eccaa
fix: remove useless release_type from workflow
cabljac File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Changesets | ||
|
||
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works | ||
with multi-package repos, or single-package repos to help you version and publish your code. You can | ||
find the full documentation for it [in our repository](https://github.com/changesets/changesets) | ||
|
||
We have a quick list of common questions to get you started engaging with this project in | ||
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@tanstack-query-firebase/angular": patch | ||
"@tanstack-query-firebase/react": patch | ||
--- | ||
|
||
Improve various CI processes and add changeset support |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json", | ||
"changelog": "@changesets/cli/changelog", | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "restricted", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [] | ||
} |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
name: Release Packages | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
dry_run: | ||
description: "Dry run (no actual release)" | ||
required: true | ||
default: false | ||
type: boolean | ||
|
||
jobs: | ||
quality: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20" | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8.15.4 | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Run format check | ||
run: pnpm format | ||
|
||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
needs: quality | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20" | ||
registry-url: "https://registry.npmjs.org" | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8.15.4 | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Install Firebase CLI | ||
uses: nick-invision/retry@v3 | ||
with: | ||
timeout_minutes: 10 | ||
retry_wait_seconds: 60 | ||
max_attempts: 3 | ||
command: npm i -g firebase-tools@14 | ||
|
||
- name: Run tests with emulator | ||
run: pnpm test:emulator | ||
|
||
- name: Build packages | ||
run: pnpm turbo build | ||
|
||
- name: Validate changesets | ||
run: | | ||
if [ -z "$(ls .changeset/*.md 2>/dev/null)" ]; then | ||
echo "❌ No changesets found. Please create changesets locally with 'pnpm changeset' before releasing." | ||
echo "Changesets should be created during development, not during release." | ||
exit 1 | ||
else | ||
echo "✅ Found $(ls .changeset/*.md | wc -l) changeset(s)" | ||
echo "Changesets:" | ||
ls .changeset/*.md | ||
fi | ||
|
||
- name: Create Release Pull Request or Publish | ||
if: ${{ !inputs.dry_run }} | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
publish: pnpm release | ||
commit: "chore: version packages" | ||
title: "chore: version packages" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Dry Run - Show Changes | ||
if: ${{ inputs.dry_run }} | ||
run: | | ||
echo "🔍 This is a dry run. The following changes would be made:" | ||
echo "" | ||
echo "📋 Changeset contents:" | ||
for file in .changeset/*.md; do | ||
if [ -f "$file" ]; then | ||
echo "--- $file ---" | ||
cat "$file" | ||
echo "" | ||
fi | ||
done | ||
|
||
echo "📦 Version changes that would be applied:" | ||
pnpm changeset version --dry-run | ||
|
||
echo "" | ||
echo "✅ Dry run completed successfully" |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,26 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"name": "vscode-jest-tests.v2", | ||
"request": "launch", | ||
"runtimeExecutable": "yarn", | ||
"args": [ | ||
"test", | ||
"--watch-all=false", | ||
"--test-name-pattern", | ||
"${jest.testNamePattern}", | ||
"--test-path-pattern", | ||
"${jest.testFilePattern}" | ||
], | ||
"cwd": "${workspaceFolder}/packages/angular", | ||
"console": "integratedTerminal", | ||
"internalConsoleOptions": "neverOpen", | ||
"disableOptimisticBPs": true | ||
} | ||
|
||
] | ||
} | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"name": "vscode-jest-tests.v2", | ||
"request": "launch", | ||
"runtimeExecutable": "yarn", | ||
"args": [ | ||
"test", | ||
"--watch-all=false", | ||
"--test-name-pattern", | ||
"${jest.testNamePattern}", | ||
"--test-path-pattern", | ||
"${jest.testFilePattern}" | ||
], | ||
"cwd": "${workspaceFolder}/packages/angular", | ||
"console": "integratedTerminal", | ||
"internalConsoleOptions": "neverOpen", | ||
"disableOptimisticBPs": true | ||
} | ||
] | ||
} |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"angular.enable-strict-mode-prompt": false | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.