also looking at this
Merge @stacksjs/ts-css into this repo as packages/toolkit
#27
128 files
+9797
-201
Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.
| @@ -1,83 +0,0 @@ | ||
| 1 | # Contributor Covenant Code of Conduct | |
| 2 | ||
| 3 | ## Our Pledge | |
| 4 | ||
| 5 | We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation. | |
| 6 | ||
| 7 | We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. | |
| 8 | ||
| 9 | ## Our Standards | |
| 10 | ||
| 11 | Examples of behavior that contributes to a positive environment for our community include: | |
| 12 | ||
| 13 | * Demonstrating empathy and kindness toward other people | |
| 14 | * Being respectful of differing opinions, viewpoints, and experiences | |
| 15 | * Giving and gracefully accepting constructive feedback | |
| 16 | * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience | |
| 17 | * Focusing on what is best not just for us as individuals, but for the overall community | |
| 18 | ||
| 19 | Examples of unacceptable behavior include: | |
| 20 | ||
| 21 | * The use of sexualized language or imagery, and sexual attention or advances of any kind | |
| 22 | * Trolling, insulting or derogatory comments, and personal or political attacks | |
| 23 | * Public or private harassment | |
| 24 | * Publishing others' private information, such as a physical or email address, without their explicit permission | |
| 25 | * Other conduct which could reasonably be considered inappropriate in a professional setting | |
| 26 | ||
| 27 | ## Enforcement Responsibilities | |
| 28 | ||
| 29 | Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. | |
| 30 | ||
| 31 | Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. | |
| 32 | ||
| 33 | ## Scope | |
| 34 | ||
| 35 | This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. | |
| 36 | ||
| 37 | ## Enforcement | |
| 38 | ||
| 39 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at chris@meema.xyz. All complaints will be reviewed and investigated promptly and fairly. | |
| 40 | ||
| 41 | All community leaders are obligated to respect the privacy and security of the reporter of any incident. | |
| 42 | ||
| 43 | ## Enforcement Guidelines | |
| 44 | ||
| 45 | Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: | |
| 46 | ||
| 47 | ### 1. Correction | |
| 48 | ||
| 49 | **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. | |
| 50 | ||
| 51 | **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. | |
| 52 | ||
| 53 | ### 2. Warning | |
| 54 | ||
| 55 | **Community Impact**: A violation through a single incident or series of actions. | |
| 56 | ||
| 57 | **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. | |
| 58 | ||
| 59 | ### 3. Temporary Ban | |
| 60 | ||
| 61 | **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. | |
| 62 | ||
| 63 | **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. | |
| 64 | ||
| 65 | ### 4. Permanent Ban | |
| 66 | ||
| 67 | **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. | |
| 68 | ||
| 69 | **Consequence**: A permanent ban from any sort of public interaction within the community. | |
| 70 | ||
| 71 | ## Attribution | |
| 72 | ||
| 73 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. | |
| 74 | ||
| 75 | Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC]. | |
| 76 | ||
| 77 | For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at [https://www.contributor-covenant.org/translations][translations]. | |
| 78 | ||
| 79 | [homepage]: https://www.contributor-covenant.org | |
| 80 | [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html | |
| 81 | [Mozilla CoC]: https://github.com/mozilla/diversity | |
| 82 | [FAQ]: https://www.contributor-covenant.org/faq | |
| 83 | [translations]: https://www.contributor-covenant.org/translations | |
| @@ -1,190 +0,0 @@ | ||
| 1 | # Contributing | |
| 2 | ||
| 3 | First off, thank you for taking the time to contribute to the Stacks ecosystem ❤️ | |
| 4 | ||
| 5 | > **Note** | |
| 6 | > The likelihood is high that the repo you are working on is either a Stack or Stacks itself. In both cases, you will be exposed to a meshup of technologies, like [Vue][vue], [Vite][vite], [Tauri][tauri], [Nitro][nitro], and [Bun][bun]. | |
| 7 | ||
| 8 | ## 💭 Knowledge | |
| 9 | ||
| 10 | ### TypeScript | |
| 11 | ||
| 12 | It's important to note early on that these projects are written with [TypeScript][typescript]. If you're unfamiliar with it (or any strongly typed languages such as Java) then this may feel like a slight roadblock. However, there's never a truly perfect time to start learning it, so ... why not today using well-written codebases as your playground? | |
| 13 | ||
| 14 | _Don't be discouraged. You will get by learning TypeScript on-the-fly as you review some of the examples within the codebase. It's easy to get started—the code is, we hope, very approachable (and readable)._ | |
| 15 | ||
| 16 | ### Architecture | |
| 17 | ||
| 18 | An understanding of the framework architecture and design will help if you're looking to contribute long-term, or if you are working on a "more complex" PR. Browse the source and read our documentation to get a better sense of how it is structured. The documentation is very thorough and can be used as your progressive guide as you're learning more about Stacks. | |
| 19 | ||
| 20 | Feel free to ask any question _(Twitter, Discord, or GitHub Discussions)_, we would love to elaborate & collaborate. | |
| 21 | ||
| 22 | ### Stacks/Core Setup | |
| 23 | ||
| 24 | Are you interested in contributing to the Stacks codebase? | |
| 25 | ||
| 26 | **Working on your first Pull Request?** You can learn how from this free series [How to Contribute to an Open Source Project on GitHub][pr-beginner-series]. | |
| 27 | ||
| 28 | Head over to the [repository][stacks] on GitHub and click the Fork button in the top right corner. After the project has been forked, run the following commands in your terminal: | |
| 29 | ||
| 30 | ```bash | |
| 31 | # Replace {github-username} with your GitHub username. | |
| 32 | git clone https://github.com/{github-username}/stacks --depth=1 | |
| 33 | ||
| 34 | cd stacks | |
| 35 | ||
| 36 | # Create a branch for your PR, replace {issue-no} with the GitHub issue number. | |
| 37 | git checkout -b issue-{issue-no} | |
| 38 | ``` | |
| 39 | ||
| 40 | Now it'll help if we keep our `main` branch pointing at the original repository and make | |
| 41 | pull requests from the forked branch. | |
| 42 | ||
| 43 | ```bash | |
| 44 | # Add the original repository as a "remote" called "upstream". | |
| 45 | git remote add upstream git@github.com:stacksjs/stacks.git | |
| 46 | ||
| 47 | # Fetch the git information from the remote. | |
| 48 | git fetch upstream | |
| 49 | ||
| 50 | # Set your local main branch to use the upstream main branch whenever you run `git pull`. | |
| 51 | git branch --set-upstream-to=upstream/main main | |
| 52 | ||
| 53 | # Run this when we want to update our version of main. | |
| 54 | git pull | |
| 55 | ``` | |
| 56 | ||
| 57 | _You may also use GitHub Desktop or any other GUI—if that is your preference._ | |
| 58 | ||
| 59 | ### Buddy Toolkit | |
| 60 | ||
| 61 | The following list of commands is one of the most common ways to interact with the Stacks API. Meet Buddy: | |
| 62 | ||
| 63 | ```bash | |
| 64 | buddy install # installs all dependencies | |
| 65 | buddy dev # starts one of the dev servers (components, functions, views, desktop or docs) | |
| 66 | buddy build # follow CLI prompts to select which library (or server) to build | |
| 67 | buddy commit # follow CLI prompts for committing changes | |
| 68 | buddy release # creates the releases of the stack & consequently, publishes them (to npm) | |
| 69 | buddy upgrade # auto-update deps & the Stacks framework | |
| 70 | ||
| 71 | buddy make:component HelloWorld # scaffolds a component | |
| 72 | buddy make:function HelloWorld # scaffolds a function | |
| 73 | buddy make:page hello-world # scaffolds a page (https://my-project.test/hello-world) | |
| 74 | ||
| 75 | buddy help | |
| 76 | ``` | |
| 77 | ||
| 78 | <details> | |
| 79 | <summary>View the complete Buddy Toolkit</summary> | |
| 80 | ||
| 81 | ```bash | |
| 82 | buddy --help # view help menu | |
| 83 | buddy install # installs your dependencies | |
| 84 | buddy fresh # fresh reinstall of all deps | |
| 85 | buddy update # auto-update deps & the Stacks framework | |
| 86 | ||
| 87 | buddy --version # get the Stacks version | |
| 88 | buddy --help # view help menu | |
| 89 | ||
| 90 | # if you need any more info to any command listed here, you may suffix | |
| 91 | # any of them via the "help option", i.e. `buddy command --help` | |
| 92 | ||
| 93 | buddy dev # starts one of the dev servers (components, functions, views, or docs) | |
| 94 | buddy dev:components # starts local playground dev server | |
| 95 | buddy dev:desktop # starts the Desktop playground | |
| 96 | buddy dev:views # starts local playground views dev server | |
| 97 | buddy dev:functions # stubs local the functions | |
| 98 | buddy dev:docs # starts local docs dev server | |
| 99 | ||
| 100 | # for Laravel folks, `serve` may ring more familiar than the `dev` name. Hence, we aliased it: | |
| 101 | buddy serve # starts one of the dev servers (components, functions, viewsviews, or docs) | |
| 102 | buddy serve:components # starts local playground dev server | |
| 103 | buddy serve:views # starts local playground views dev server | |
| 104 | buddy serve:functions # stubs local the functions | |
| 105 | buddy serve:docs # starts local docs dev server | |
| 106 | ||
| 107 | # sets your application key | |
| 108 | buddy key:generate | |
| 109 | ||
| 110 | buddy make:stack project | |
| 111 | buddy make:component HelloWorld | |
| 112 | buddy make:function hello-world | |
| 113 | buddy make:page hello-world | |
| 114 | buddy make:lang de | |
| 115 | buddy make:database cars | |
| 116 | buddy make:table brands | |
| 117 | buddy make:migration create_cars_table | |
| 118 | buddy make:factory cars | |
| 119 | ||
| 120 | buddy lint # runs linter | |
| 121 | buddy lint:fix # runs linter and fixes issues | |
| 122 | ||
| 123 | buddy commit # follow CLI prompts for committing staged changes | |
| 124 | buddy release # creates the releases for the stack & triggers the Release Action (workflow) | |
| 125 | buddy changelog # generates CHANGELOG.md | |
| 126 | ||
| 127 | # building for production (e.g. npm, Vercel, Netlify, et al.) | |
| 128 | buddy build # select a specific build (follow CLI prompts) | |
| 129 | buddy build:components # builds Vue component library & Web Component library | |
| 130 | buddy build:functions # builds function library | |
| 131 | buddy build:vue-components # builds Vue 2 & 3-ready Component library | |
| 132 | buddy build:web-components # builds framework agnostic Web Component library (i.e. Custom Elements) | |
| 133 | buddy build:views # builds views | |
| 134 | ||
| 135 | # when deploying your app/s | |
| 136 | buddy deploy:docs | |
| 137 | buddy deploy:functions | |
| 138 | buddy deploy:views | |
| 139 | ||
| 140 | # select the example to run (follow CLI prompts) | |
| 141 | buddy example | |
| 142 | ||
| 143 | # test your stack | |
| 144 | buddy test # runs test suite (unit & e2e) | |
| 145 | buddy test:coverage # runs test coverage | |
| 146 | buddy test:types # runs typecheck | |
| 147 | ``` | |
| 148 | ||
| 149 | </details> | |
| 150 | ||
| 151 | ## 🧪 Testing | |
| 152 | ||
| 153 | All the framework tests are stored within the `./.stacks/tests` project folder. When adding or updating functionality, please ensure it is covered through our test suite. Ensure so by running `buddy test`. | |
| 154 | ||
| 155 | When working on an individual Stack, tests are stored within the `./tests` project folder & it is recommended to write tests (when useful). Bu | |
| 156 | ||
| 157 | ## ✍️ Commit | |
| 158 | ||
| 159 | Stacks uses [semantic commit messages][semantic-commit-style] to automate package releases. No worries, you may not be aware what this is or how it works—just let Buddy guide you. Stacks automated the commit process for you, simply run `buddy commit` in your terminal and follow the instructions. | |
| 160 | ||
| 161 | For example, | |
| 162 | ||
| 163 | ```bash | |
| 164 | # Add all changes to staging to be committed. | |
| 165 | git add . | |
| 166 | ||
| 167 | # Commit changes. | |
| 168 | buddy commit | |
| 169 | ||
| 170 | # Push changes up to GitHub. | |
| 171 | git push | |
| 172 | ``` | |
| 173 | ||
| 174 | _By following these minor steps, Stacks is able to automatically release new versions & generate relating local & remote changelogs._ | |
| 175 | ||
| 176 | ## 🎉 Pull Request | |
| 177 | ||
| 178 | When you're all done, head over to the [repository][stacks], and click the big green `Compare & Pull Request` button that should appear after you've pushed changes to your fork. | |
| 179 | ||
| 180 | Don't expect your PR to be accepted immediately or even accepted at all. Give the community time to vet it and see if it should be merged. Please don't be disheartened if it's not accepted. Your contribution is appreciated more than you can imagine, and even a unmerged PR can teach us a lot ❤️ | |
| 181 | ||
| 182 | [typescript]: https://www.typescriptlang.org | |
| 183 | [vue]: https://vuejs.org/ | |
| 184 | [vite]: https://vitejs.dev/ | |
| 185 | [tauri]: https://tauri.app/ | |
| 186 | [nitro]: https://nitro.unjs.io/ | |
| 187 | [bun]: https://bun.sh/ | |
| 188 | [stacks]: https://github.com/stacksjs/stacks | |
| 189 | [semantic-commit-style]: https://gist.github.com/joshbuchea/6f47e86d2510bce28f8e7f42ae84c716 | |
| 190 | [pr-beginner-series]: https://app.egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github | |
| @@ -1,70 +0,0 @@ | ||
| 1 | # Security Policy | |
| 2 | ||
| 3 | **PLEASE DON'T DISCLOSE SECURITY-RELATED ISSUES PUBLICLY, [SEE BELOW](#reporting-a-vulnerability).** | |
| 4 | ||
| 5 | ## Supported Versions | |
| 6 | ||
| 7 | Only the latest major version receives security fixes. | |
| 8 | ||
| 9 | ## Reporting a Vulnerability | |
| 10 | ||
| 11 | If you discover a security vulnerability within this package, please send an email to Chris Breuer at chris@meema.xyz. All security vulnerabilities will be promptly addressed. | |
| 12 | ||
| 13 | ### Public PGP Key | |
| 14 | ||
| 15 | ``` | |
| 16 | -----BEGIN PGP PUBLIC KEY BLOCK----- | |
| 17 | Version: OpenPGP v2.0.8 | |
| 18 | Comment: https://sela.io/pgp/ | |
| 19 | ||
| 20 | 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 | |
| 67 | HF/6SiI= | |
| 68 | =le/X | |
| 69 | -----END PGP PUBLIC KEY BLOCK----- | |
| 70 | ``` | |
Binary file. Nothing to show line by line.
| @@ -1,14 +0,0 @@ | ||
| 1 | daysUntilStale: 60 | |
| 2 | daysUntilClose: 7 | |
| 3 | exemptLabels: | |
| 4 | - pinned | |
| 5 | - security | |
| 6 | - no-stale | |
| 7 | - no stale | |
| 8 | - pr welcome | |
| 9 | staleLabel: stale | |
| 10 | markComment: > | |
| 11 | This issue has been automatically marked as stale because it has not had | |
| 12 | recent activity. It will be closed if no further activity occurs. | |
| 13 | Thank you for your contributions. | |
| 14 | closeComment: false | |
| @@ -1,13 +0,0 @@ | ||
| 1 | # GitHub Actions | |
| 2 | ||
| 3 | This folder contains the following GitHub Actions: | |
| 4 | ||
| 5 | - [CI][CI] - all CI jobs for the project | |
| 6 | - lints the code | |
| 7 | - `typecheck`s the code | |
| 8 | - runs test suite | |
| 9 | - runs on `ubuntu-latest` | |
| 10 | - [Release][Release] - automates the release process & changelog generation | |
| 11 | ||
| 12 | [CI]: ./workflows/ci.yml | |
| 13 | [Release]: ./workflows/release.yml | |
| @@ -1,512 +0,0 @@ | ||
| 1 | name: Buddy Bot | |
| 2 | ||
| 3 | on: | |
| 4 | schedule: | |
| 5 | # Check for rebase requests every ~20 minutes (offset to avoid overlap with update/dashboard) | |
| 6 | - cron: '5,25,45 * * * *' | |
| 7 | # Update dependencies every 2 hours | |
| 8 | - cron: '0 */2 * * *' | |
| 9 | # Update dashboard 15 minutes after dependency updates (ensures updates are reflected) | |
| 10 | - cron: '15 */2 * * *' | |
| 11 | ||
| 12 | workflow_dispatch: # Manual trigger | |
| 13 | inputs: | |
| 14 | job: | |
| 15 | description: Which job to run | |
| 16 | required: false | |
| 17 | default: all | |
| 18 | type: choice | |
| 19 | options: | |
| 20 | - all | |
| 21 | - check | |
| 22 | - update | |
| 23 | - dashboard | |
| 24 | # Update job inputs | |
| 25 | strategy: | |
| 26 | description: Update strategy | |
| 27 | required: false | |
| 28 | default: patch | |
| 29 | type: choice | |
| 30 | options: | |
| 31 | - all | |
| 32 | - major | |
| 33 | - minor | |
| 34 | - patch | |
| 35 | packages: | |
| 36 | description: Specific packages (comma-separated) | |
| 37 | required: false | |
| 38 | type: string | |
| 39 | # Dashboard job inputs | |
| 40 | title: | |
| 41 | description: Custom dashboard title | |
| 42 | required: false | |
| 43 | type: string | |
| 44 | issue_number: | |
| 45 | description: Specific issue number to update | |
| 46 | required: false | |
| 47 | type: string | |
| 48 | # Common inputs | |
| 49 | dry_run: | |
| 50 | description: Dry run (preview only) | |
| 51 | required: false | |
| 52 | default: false | |
| 53 | type: boolean | |
| 54 | verbose: | |
| 55 | description: Enable verbose logging | |
| 56 | required: false | |
| 57 | default: true | |
| 58 | type: boolean | |
| 59 | ||
| 60 | env: | |
| 61 | # For workflow file updates, you need a Personal Access Token with 'repo' and 'workflow' scopes | |
| 62 | # Create a PAT at: https://github.com/settings/tokens | |
| 63 | # Add it as a repository secret named 'BUDDY_BOT_TOKEN' | |
| 64 | # If BUDDY_BOT_TOKEN is not available, falls back to GITHUB_TOKEN (limited permissions) | |
| 65 | GITHUB_TOKEN: ${{ secrets.BUDDY_BOT_TOKEN || secrets.GITHUB_TOKEN }} | |
| 66 | BUDDY_BOT_TOKEN: ${{ secrets.BUDDY_BOT_TOKEN }} | |
| 67 | ||
| 68 | permissions: | |
| 69 | contents: write | |
| 70 | pull-requests: write | |
| 71 | issues: write | |
| 72 | actions: write | |
| 73 | checks: read | |
| 74 | statuses: read | |
| 75 | ||
| 76 | jobs: | |
| 77 | # Job to determine which jobs should run based on trigger | |
| 78 | determine-jobs: | |
| 79 | runs-on: ubuntu-latest | |
| 80 | outputs: | |
| 81 | run_check: ${{ steps.determine.outputs.run_check }} | |
| 82 | run_update: ${{ steps.determine.outputs.run_update }} | |
| 83 | run_dashboard: ${{ steps.determine.outputs.run_dashboard }} | |
| 84 | steps: | |
| 85 | - name: Determine which jobs to run | |
| 86 | id: determine | |
| 87 | run: | | |
| 88 | # Default to not running any jobs | |
| 89 | echo "run_check=false" >> $GITHUB_OUTPUT | |
| 90 | echo "run_update=false" >> $GITHUB_OUTPUT | |
| 91 | echo "run_dashboard=false" >> $GITHUB_OUTPUT | |
| 92 | ||
| 93 | if [ "$" = "workflow_dispatch" ]; then | |
| 94 | JOB="$" | |
| 95 | if [ "$JOB" = "all" ] || [ "$JOB" = "check" ]; then | |
| 96 | echo "run_check=true" >> $GITHUB_OUTPUT | |
| 97 | fi | |
| 98 | if [ "$JOB" = "all" ] || [ "$JOB" = "update" ]; then | |
| 99 | echo "run_update=true" >> $GITHUB_OUTPUT | |
| 100 | fi | |
| 101 | if [ "$JOB" = "all" ] || [ "$JOB" = "dashboard" ]; then | |
| 102 | echo "run_dashboard=true" >> $GITHUB_OUTPUT | |
| 103 | fi | |
| 104 | elif [ "$" = "schedule" ]; then | |
| 105 | # Determine based on cron schedule | |
| 106 | if [ "$" = "5,25,45 * * * *" ]; then | |
| 107 | echo "run_check=true" >> $GITHUB_OUTPUT | |
| 108 | elif [ "$" = "0 */2 * * *" ]; then | |
| 109 | echo "run_update=true" >> $GITHUB_OUTPUT | |
| 110 | elif [ "$" = "15 */2 * * *" ]; then | |
| 111 | echo "run_dashboard=true" >> $GITHUB_OUTPUT | |
| 112 | fi | |
| 113 | fi | |
| 114 | ||
| 115 | # Shared setup job for common dependencies | |
| 116 | setup: | |
| 117 | runs-on: ubuntu-latest | |
| 118 | needs: determine-jobs | |
| 119 | if: ${{ needs.determine-jobs.outputs.run_check == 'true' || needs.determine-jobs.outputs.run_update == 'true' || needs.determine-jobs.outputs.run_dashboard == 'true' }} | |
| 120 | steps: | |
| 121 | - name: Checkout repository | |
| 122 | uses: actions/checkout@v6 | |
| 123 | with: | |
| 124 | token: ${{ secrets.BUDDY_BOT_TOKEN || secrets.GITHUB_TOKEN }} | |
| 125 | fetch-depth: 0 # Fetch full history for rebasing | |
| 126 | persist-credentials: true | |
| 127 | ||
| 128 | - name: Setup Bun | |
| 129 | uses: oven-sh/setup-bun@v2 | |
| 130 | ||
| 131 | - name: Setup PHP and Composer (if needed) | |
| 132 | if: ${{ hashFiles('composer.json') != '' }} | |
| 133 | uses: shivammathur/setup-php@v2 | |
| 134 | with: | |
| 135 | php-version: '8.4' | |
| 136 | tools: composer | |
| 137 | coverage: none | |
| 138 | ||
| 139 | - name: Install Composer dependencies (if needed) | |
| 140 | if: ${{ hashFiles('composer.json') != '' }} | |
| 141 | run: composer install --prefer-dist --optimize-autoloader | |
| 142 | ||
| 143 | - name: Install dependencies | |
| 144 | run: bun install | |
| 145 | ||
| 146 | - name: Configure Git | |
| 147 | run: | | |
| 148 | git config --global user.name "github-actions[bot]" | |
| 149 | git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| 150 | ||
| 151 | # Check job (handles both rebase requests and auto-closing PRs) | |
| 152 | check: | |
| 153 | runs-on: ubuntu-latest | |
| 154 | needs: [determine-jobs, setup] | |
| 155 | if: ${{ needs.determine-jobs.outputs.run_check == 'true' }} | |
| 156 | ||
| 157 | steps: | |
| 158 | - name: Checkout repository | |
| 159 | uses: actions/checkout@v6 | |
| 160 | with: | |
| 161 | token: ${{ secrets.BUDDY_BOT_TOKEN || secrets.GITHUB_TOKEN }} | |
| 162 | fetch-depth: 0 | |
| 163 | persist-credentials: true | |
| 164 | ||
| 165 | - name: Setup Bun | |
| 166 | uses: oven-sh/setup-bun@v2 | |
| 167 | ||
| 168 | - name: Install dependencies | |
| 169 | run: bun install | |
| 170 | ||
| 171 | - name: Configure Git | |
| 172 | run: | | |
| 173 | git config --global user.name "github-actions[bot]" | |
| 174 | git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| 175 | ||
| 176 | - name: Check token permissions | |
| 177 | run: | | |
| 178 | if [ -z "$" ]; then | |
| 179 | echo "⚠️ Using GITHUB_TOKEN (limited permissions)" | |
| 180 | echo "💡 For full workflow file update support:" | |
| 181 | echo " 1. Create a Personal Access Token with 'repo' and 'workflow' scopes" | |
| 182 | echo " 2. Add it as repository secret 'BUDDY_BOT_TOKEN'" | |
| 183 | echo " 3. Re-run this workflow" | |
| 184 | else | |
| 185 | echo "✅ Using BUDDY_BOT_TOKEN (full permissions)" | |
| 186 | fi | |
| 187 | ||
| 188 | - name: Check for PRs that need attention | |
| 189 | run: | | |
| 190 | echo "🔍 Checking for PRs that need attention (rebase requests or auto-closing)..." | |
| 191 | echo "🔧 Environment info:" | |
| 192 | echo "Current directory: $(pwd)" | |
| 193 | echo "GITHUB_TOKEN set: $([[ -n "$GITHUB_TOKEN" ]] && echo "Yes" || echo "No")" | |
| 194 | echo "Repository: $" | |
| 195 | echo "Event: $" | |
| 196 | echo "" | |
| 197 | ||
| 198 | echo "🚀 Running update-check command..." | |
| 199 | set -e # Exit on any error | |
| 200 | ||
| 201 | if [ "$" = "true" ]; then | |
| 202 | echo "📋 Running in DRY RUN mode..." | |
| 203 | bunx buddy-bot update-check --dry-run --verbose | |
| 204 | else | |
| 205 | echo "🔄 Running in LIVE mode..." | |
| 206 | bunx buddy-bot update-check --verbose | |
| 207 | fi | |
| 208 | ||
| 209 | env: | |
| 210 | GITHUB_TOKEN: ${{ secrets.BUDDY_BOT_TOKEN || secrets.GITHUB_TOKEN }} | |
| 211 | BUDDY_BOT_TOKEN: ${{ secrets.BUDDY_BOT_TOKEN }} | |
| 212 | ||
| 213 | - name: Create check summary | |
| 214 | if: always() | |
| 215 | run: | | |
| 216 | echo "## 🔍 Check Summary" >> $GITHUB_STEP_SUMMARY | |
| 217 | echo "" >> $GITHUB_STEP_SUMMARY | |
| 218 | echo "- **Triggered by**: $" >> $GITHUB_STEP_SUMMARY | |
| 219 | echo "- **Dry run**: $" >> $GITHUB_STEP_SUMMARY | |
| 220 | echo "- **Time**: $(date)" >> $GITHUB_STEP_SUMMARY | |
| 221 | echo "" >> $GITHUB_STEP_SUMMARY | |
| 222 | ||
| 223 | if [ "$" = "schedule" ]; then | |
| 224 | echo "⏰ **Scheduled Check**: Automatically checks every 20 minutes" >> $GITHUB_STEP_SUMMARY | |
| 225 | else | |
| 226 | echo "🖱️ **Manual Check**: Manually triggered from Actions tab" >> $GITHUB_STEP_SUMMARY | |
| 227 | fi | |
| 228 | ||
| 229 | echo "" >> $GITHUB_STEP_SUMMARY | |
| 230 | echo "📋 View detailed logs above for check results (rebase requests and auto-closing)." >> $GITHUB_STEP_SUMMARY | |
| 231 | ||
| 232 | # Dependency update job | |
| 233 | dependency-update: | |
| 234 | runs-on: ubuntu-latest | |
| 235 | needs: [determine-jobs, setup] | |
| 236 | if: ${{ needs.determine-jobs.outputs.run_update == 'true' }} | |
| 237 | ||
| 238 | steps: | |
| 239 | - name: Checkout repository | |
| 240 | uses: actions/checkout@v6 | |
| 241 | with: | |
| 242 | token: ${{ secrets.BUDDY_BOT_TOKEN || secrets.GITHUB_TOKEN }} | |
| 243 | fetch-depth: 0 | |
| 244 | persist-credentials: true | |
| 245 | ||
| 246 | - name: Setup Bun | |
| 247 | uses: oven-sh/setup-bun@v2 | |
| 248 | ||
| 249 | - name: Setup PHP and Composer (if needed) | |
| 250 | if: ${{ hashFiles('composer.json') != '' }} | |
| 251 | uses: shivammathur/setup-php@v2 | |
| 252 | with: | |
| 253 | php-version: '8.4' | |
| 254 | tools: composer | |
| 255 | coverage: none | |
| 256 | ||
| 257 | - name: Install Composer dependencies (if needed) | |
| 258 | if: ${{ hashFiles('composer.json') != '' }} | |
| 259 | run: composer install --prefer-dist --optimize-autoloader | |
| 260 | ||
| 261 | - name: Install dependencies | |
| 262 | run: bun install | |
| 263 | ||
| 264 | - name: Configure Git | |
| 265 | run: | | |
| 266 | git config --global user.name "github-actions[bot]" | |
| 267 | git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| 268 | ||
| 269 | - name: Display update configuration | |
| 270 | run: | | |
| 271 | echo "🧪 **Buddy Bot Update Mode**" | |
| 272 | echo "Strategy: $" | |
| 273 | echo "Dry Run: $" | |
| 274 | echo "Packages: $" | |
| 275 | echo "Verbose: $" | |
| 276 | echo "Triggered by: $" | |
| 277 | echo "Repository: $" | |
| 278 | echo "Branch: $" | |
| 279 | ||
| 280 | - name: Run Buddy dependency updates | |
| 281 | if: ${{ github.event.inputs.dry_run != 'true' }} | |
| 282 | run: | | |
| 283 | STRATEGY="$" | |
| 284 | PACKAGES="$" | |
| 285 | VERBOSE="$" | |
| 286 | ||
| 287 | echo "🚀 Running dependency updates..." | |
| 288 | echo "This will create/update PRs if outdated dependencies are found" | |
| 289 | echo "" | |
| 290 | ||
| 291 | set -e # Exit on any error | |
| 292 | ||
| 293 | if [ "$PACKAGES" != "" ]; then | |
| 294 | if [ "$VERBOSE" = "true" ]; then | |
| 295 | bunx buddy-bot update --packages "$PACKAGES" --verbose | |
| 296 | else | |
| 297 | bunx buddy-bot update --packages "$PACKAGES" | |
| 298 | fi | |
| 299 | else | |
| 300 | if [ "$VERBOSE" = "true" ]; then | |
| 301 | bunx buddy-bot update --strategy "$STRATEGY" --verbose | |
| 302 | else | |
| 303 | bunx buddy-bot update --strategy "$STRATEGY" | |
| 304 | fi | |
| 305 | fi | |
| 306 | ||
| 307 | env: | |
| 308 | GITHUB_TOKEN: ${{ secrets.BUDDY_BOT_TOKEN || secrets.GITHUB_TOKEN }} | |
| 309 | BUDDY_BOT_TOKEN: ${{ secrets.BUDDY_BOT_TOKEN }} | |
| 310 | ||
| 311 | - name: Dry run notification | |
| 312 | if: ${{ github.event.inputs.dry_run == 'true' }} | |
| 313 | run: | | |
| 314 | echo "ℹ️ **Dry Run Mode** - No changes were made" | |
| 315 | echo "To apply updates, run this workflow again with 'Dry run' set to false" | |
| 316 | ||
| 317 | - name: Create update summary | |
| 318 | if: always() | |
| 319 | run: | | |
| 320 | echo "## 🚀 Dependency Update Summary" >> $GITHUB_STEP_SUMMARY | |
| 321 | echo "" >> $GITHUB_STEP_SUMMARY | |
| 322 | echo "- **Strategy**: $" >> $GITHUB_STEP_SUMMARY | |
| 323 | echo "- **Triggered by**: $" >> $GITHUB_STEP_SUMMARY | |
| 324 | echo "- **Dry run**: $" >> $GITHUB_STEP_SUMMARY | |
| 325 | echo "- **Packages**: $" >> $GITHUB_STEP_SUMMARY | |
| 326 | echo "- **Verbose**: $" >> $GITHUB_STEP_SUMMARY | |
| 327 | echo "- **Time**: $(date)" >> $GITHUB_STEP_SUMMARY | |
| 328 | echo "" >> $GITHUB_STEP_SUMMARY | |
| 329 | ||
| 330 | if [ "$" = "schedule" ]; then | |
| 331 | echo "⏰ **Scheduled Run**: This was triggered automatically every 2 hours" >> $GITHUB_STEP_SUMMARY | |
| 332 | echo "💡 **Tip**: Use 'Actions' tab to manually trigger with custom settings" >> $GITHUB_STEP_SUMMARY | |
| 333 | else | |
| 334 | echo "🖱️ **Manual Trigger**: This was triggered manually from the Actions tab" >> $GITHUB_STEP_SUMMARY | |
| 335 | echo "⏰ **Auto-Schedule**: This workflow also runs every 2 hours" >> $GITHUB_STEP_SUMMARY | |
| 336 | fi | |
| 337 | ||
| 338 | echo "" >> $GITHUB_STEP_SUMMARY | |
| 339 | echo "📊 View detailed logs above for scan and update results." >> $GITHUB_STEP_SUMMARY | |
| 340 | ||
| 341 | # Dashboard update job | |
| 342 | dashboard-update: | |
| 343 | runs-on: ubuntu-latest | |
| 344 | needs: [determine-jobs, setup, dependency-update] | |
| 345 | if: ${{ needs.determine-jobs.outputs.run_dashboard == 'true' && always() }} | |
| 346 | ||
| 347 | steps: | |
| 348 | - name: Checkout repository | |
| 349 | uses: actions/checkout@v6 | |
| 350 | with: | |
| 351 | token: ${{ secrets.BUDDY_BOT_TOKEN || secrets.GITHUB_TOKEN }} | |
| 352 | ||
| 353 | - name: Setup Bun | |
| 354 | uses: oven-sh/setup-bun@v2 | |
| 355 | ||
| 356 | - name: Install dependencies | |
| 357 | run: bun install | |
| 358 | ||
| 359 | - name: Display dashboard configuration | |
| 360 | run: | | |
| 361 | echo "📊 **Buddy Bot Dashboard Management**" | |
| 362 | echo "Pin Dashboard: $" | |
| 363 | echo "Custom Title: $" | |
| 364 | echo "Issue Number: $" | |
| 365 | echo "Verbose: $" | |
| 366 | echo "Dry Run: $" | |
| 367 | echo "Triggered by: $" | |
| 368 | echo "Repository: $" | |
| 369 | echo "Branch: $" | |
| 370 | ||
| 371 | - name: Pre-flight dashboard check | |
| 372 | if: ${{ github.event.inputs.dry_run != 'true' }} | |
| 373 | run: | | |
| 374 | echo "🔍 Pre-flight check: Looking for existing dashboard issues..." | |
| 375 | ||
| 376 | # Check for existing dashboard issues to prevent duplicates | |
| 377 | if command -v gh &> /dev/null; then | |
| 378 | EXISTING_DASHBOARDS=$(gh issue list --label "dashboard,dependencies" --state open --json number,title,url --jq length 2>/dev/null || echo "0") | |
| 379 | echo "Found $EXISTING_DASHBOARDS existing dashboard issue(s)" | |
| 380 | ||
| 381 | if [ "$EXISTING_DASHBOARDS" -gt 1 ]; then | |
| 382 | echo "⚠️ WARNING: Multiple dashboard issues detected!" | |
| 383 | gh issue list --label "dashboard,dependencies" --state open --json number,title,url --jq '.[] | " - #\(.number): \(.title) - \(.url)"' 2>/dev/null || true | |
| 384 | echo "" | |
| 385 | echo "🔧 Buddy Bot will attempt to update the most recent one and may close duplicates" | |
| 386 | elif [ "$EXISTING_DASHBOARDS" -eq 1 ]; then | |
| 387 | DASHBOARD_INFO=$(gh issue list --label "dashboard,dependencies" --state open --json number,title,url --jq '.[0] | "#\(.number): \(.title) - \(.url)"' 2>/dev/null || echo "Found 1 dashboard") | |
| 388 | echo "✅ Found existing dashboard: $DASHBOARD_INFO" | |
| 389 | else | |
| 390 | echo "ℹ️ No existing dashboard found - a new one will be created" | |
| 391 | fi | |
| 392 | else | |
| 393 | echo "⚠️ GitHub CLI not available - cannot perform pre-flight check" | |
| 394 | fi | |
| 395 | ||
| 396 | - name: Update Dependency Dashboard | |
| 397 | run: | | |
| 398 | PIN="$" | |
| 399 | TITLE="$" | |
| 400 | ISSUE_NUMBER="$" | |
| 401 | VERBOSE="$" | |
| 402 | DRY_RUN="$" | |
| 403 | ||
| 404 | echo "📊 Updating dependency dashboard..." | |
| 405 | echo "Pin: $PIN" | |
| 406 | echo "Title: ${TITLE:-default}" | |
| 407 | echo "Issue Number: ${ISSUE_NUMBER:-auto-detect}" | |
| 408 | echo "Verbose: $VERBOSE" | |
| 409 | echo "Dry Run: $DRY_RUN" | |
| 410 | echo "" | |
| 411 | ||
| 412 | set -e # Exit on any error | |
| 413 | ||
| 414 | # Build the command | |
| 415 | COMMAND="bunx buddy-bot dashboard" | |
| 416 | ||
| 417 | if [ "$TITLE" != "" ]; then | |
| 418 | COMMAND="$COMMAND --title \"$TITLE\"" | |
| 419 | fi | |
| 420 | ||
| 421 | if [ "$ISSUE_NUMBER" != "" ]; then | |
| 422 | COMMAND="$COMMAND --issue-number \"$ISSUE_NUMBER\"" | |
| 423 | fi | |
| 424 | ||
| 425 | if [ "$VERBOSE" = "true" ]; then | |
| 426 | COMMAND="$COMMAND --verbose" | |
| 427 | fi | |
| 428 | ||
| 429 | if [ "$DRY_RUN" = "true" ]; then | |
| 430 | echo "📋 DRY RUN MODE - Command that would be executed:" | |
| 431 | echo "$COMMAND" | |
| 432 | echo "" | |
| 433 | echo "ℹ️ In dry run mode, dashboard content would be generated but no issue would be created/updated" | |
| 434 | ||
| 435 | # Run scan to show what would be included | |
| 436 | echo "🔍 Scanning for dependencies that would be included:" | |
| 437 | if [ "$VERBOSE" = "true" ]; then | |
| 438 | bunx buddy-bot scan --verbose | |
| 439 | else | |
| 440 | bunx buddy-bot scan | |
| 441 | fi | |
| 442 | else | |
| 443 | echo "🚀 Executing dashboard update:" | |
| 444 | echo "$COMMAND" | |
| 445 | echo "" | |
| 446 | eval "$COMMAND" | |
| 447 | fi | |
| 448 | ||
| 449 | env: | |
| 450 | GITHUB_TOKEN: ${{ secrets.BUDDY_BOT_TOKEN || secrets.GITHUB_TOKEN }} | |
| 451 | BUDDY_BOT_TOKEN: ${{ secrets.BUDDY_BOT_TOKEN }} | |
| 452 | ||
| 453 | - name: Dry run notification | |
| 454 | if: ${{ github.event.inputs.dry_run == 'true' }} | |
| 455 | run: | | |
| 456 | echo "ℹ️ **Dry Run Mode** - Dashboard preview completed" | |
| 457 | echo "To actually update the dashboard, run this workflow again with 'Dry run' set to false" | |
| 458 | ||
| 459 | - name: Check dashboard status | |
| 460 | if: ${{ github.event.inputs.dry_run != 'true' }} | |
| 461 | run: | | |
| 462 | echo "✅ Dashboard update completed" | |
| 463 | echo "🔗 Check your repository issues for the updated dependency dashboard" | |
| 464 | ||
| 465 | # Try to find and link to the dashboard issue | |
| 466 | echo "📊 Looking for dependency dashboard issue..." | |
| 467 | ||
| 468 | # Use GitHub CLI to find the dashboard issue | |
| 469 | if command -v gh &> /dev/null; then | |
| 470 | DASHBOARD_URL=$(gh issue list --label "dashboard,dependencies" --state open --limit 1 --json url --jq '.[0].url' 2>/dev/null || echo "") | |
| 471 | if [ "$DASHBOARD_URL" != "null" ] && [ "$DASHBOARD_URL" != "" ]; then | |
| 472 | echo "🎯 Dashboard found: $DASHBOARD_URL" | |
| 473 | else | |
| 474 | echo "🔍 Dashboard issue not found via CLI, check issues manually" | |
| 475 | fi | |
| 476 | else | |
| 477 | echo "💡 Check your issues tab for the dependency dashboard" | |
| 478 | fi | |
| 479 | ||
| 480 | - name: Create dashboard summary | |
| 481 | if: always() | |
| 482 | run: | | |
| 483 | echo "## 📊 Dependency Dashboard Summary" >> $GITHUB_STEP_SUMMARY | |
| 484 | echo "" >> $GITHUB_STEP_SUMMARY | |
| 485 | echo "- **Pin Dashboard**: $" >> $GITHUB_STEP_SUMMARY | |
| 486 | echo "- **Custom Title**: $" >> $GITHUB_STEP_SUMMARY | |
| 487 | echo "- **Issue Number**: $" >> $GITHUB_STEP_SUMMARY | |
| 488 | echo "- **Triggered by**: $" >> $GITHUB_STEP_SUMMARY | |
| 489 | echo "- **Dry run**: $" >> $GITHUB_STEP_SUMMARY | |
| 490 | echo "- **Verbose**: $" >> $GITHUB_STEP_SUMMARY | |
| 491 | echo "- **Time**: $(date)" >> $GITHUB_STEP_SUMMARY | |
| 492 | echo "" >> $GITHUB_STEP_SUMMARY | |
| 493 | ||
| 494 | if [ "$" = "schedule" ]; then | |
| 495 | echo "⏰ **Scheduled Update**: This was triggered automatically" >> $GITHUB_STEP_SUMMARY | |
| 496 | echo "🔄 **Schedule**: Every 2 hours, 15 minutes after dependency updates" >> $GITHUB_STEP_SUMMARY | |
| 497 | echo "💡 **Tip**: Use 'Actions' tab to manually trigger with custom settings" >> $GITHUB_STEP_SUMMARY | |
| 498 | else | |
| 499 | echo "🖱️ **Manual Trigger**: This was triggered manually from the Actions tab" >> $GITHUB_STEP_SUMMARY | |
| 500 | echo "⏰ **Auto-Schedule**: This workflow also runs automatically on schedule" >> $GITHUB_STEP_SUMMARY | |
| 501 | fi | |
| 502 | ||
| 503 | echo "" >> $GITHUB_STEP_SUMMARY | |
| 504 | ||
| 505 | if [ "$" = "true" ]; then | |
| 506 | echo "📋 **Dry Run**: No changes were made. Dashboard content was previewed only." >> $GITHUB_STEP_SUMMARY | |
| 507 | else | |
| 508 | echo "✅ **Dashboard Updated**: Check your repository issues for the updated dependency dashboard." >> $GITHUB_STEP_SUMMARY | |
| 509 | fi | |
| 510 | ||
| 511 | echo "" >> $GITHUB_STEP_SUMMARY | |
| 512 | echo "📊 View detailed logs above for dashboard update results." >> $GITHUB_STEP_SUMMARY | |
| @@ -1,108 +0,0 @@ | ||
| 1 | name: CI | |
| 2 | ||
| 3 | on: | |
| 4 | push: | |
| 5 | branches: | |
| 6 | - main | |
| 7 | ||
| 8 | pull_request: | |
| 9 | branches: | |
| 10 | - main | |
| 11 | ||
| 12 | concurrency: | |
| 13 | group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| 14 | cancel-in-progress: true | |
| 15 | ||
| 16 | jobs: | |
| 17 | lint: | |
| 18 | runs-on: ubuntu-latest | |
| 19 | ||
| 20 | steps: | |
| 21 | - uses: actions/checkout@v6 | |
| 22 | ||
| 23 | - name: Install Bun | |
| 24 | uses: oven-sh/setup-bun@v2.2.0 | |
| 25 | ||
| 26 | - name: Use cached node_modules | |
| 27 | uses: actions/cache@v5.0.4 | |
| 28 | with: | |
| 29 | path: node_modules | |
| 30 | key: node-modules-${{ hashFiles('**/bun.lock') }} | |
| 31 | restore-keys: | | |
| 32 | node-modules- | |
| 33 | ||
| 34 | - name: Install Dependencies | |
| 35 | run: bun install | |
| 36 | ||
| 37 | - name: Lint | |
| 38 | run: bun run lint | |
| 39 | ||
| 40 | typecheck: | |
| 41 | runs-on: ubuntu-latest | |
| 42 | ||
| 43 | steps: | |
| 44 | - uses: actions/checkout@v6 | |
| 45 | ||
| 46 | - name: Install Bun | |
| 47 | uses: oven-sh/setup-bun@v2.2.0 | |
| 48 | ||
| 49 | - name: Use cached node_modules | |
| 50 | uses: actions/cache@v5.0.4 | |
| 51 | with: | |
| 52 | path: node_modules | |
| 53 | key: node-modules-${{ hashFiles('**/bun.lock') }} | |
| 54 | restore-keys: | | |
| 55 | node-modules- | |
| 56 | ||
| 57 | - name: Install Dependencies | |
| 58 | run: bun install | |
| 59 | ||
| 60 | - name: Typecheck | |
| 61 | run: bun --bun run typecheck | |
| 62 | ||
| 63 | test: | |
| 64 | runs-on: ubuntu-latest | |
| 65 | ||
| 66 | steps: | |
| 67 | - uses: actions/checkout@v6 | |
| 68 | ||
| 69 | - name: Install Bun | |
| 70 | uses: oven-sh/setup-bun@v2.2.0 | |
| 71 | ||
| 72 | - name: Use cached node_modules | |
| 73 | uses: actions/cache@v5.0.4 | |
| 74 | with: | |
| 75 | path: node_modules | |
| 76 | key: node-modules-${{ hashFiles('**/bun.lock') }} | |
| 77 | restore-keys: | | |
| 78 | node-modules- | |
| 79 | ||
| 80 | - name: Install Dependencies | |
| 81 | run: bun install | |
| 82 | ||
| 83 | - name: Unit Test | |
| 84 | run: bun test | |
| 85 | ||
| 86 | publish-commit: | |
| 87 | needs: [lint, typecheck, test] | |
| 88 | runs-on: ubuntu-latest | |
| 89 | ||
| 90 | steps: | |
| 91 | - uses: actions/checkout@v6 | |
| 92 | with: | |
| 93 | fetch-depth: 0 | |
| 94 | ||
| 95 | - name: Setup Pantry | |
| 96 | uses: home-lang/pantry/packages/action@main | |
| 97 | ||
| 98 | - name: Install Dependencies | |
| 99 | run: bun install | |
| 100 | ||
| 101 | - name: Build | |
| 102 | run: bun run build | |
| 103 | ||
| 104 | - name: Publish Commit | |
| 105 | if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| 106 | run: pantry publish:commit '.' | |
| 107 | env: | |
| 108 | PANTRY_REGISTRY_TOKEN: ${{ secrets.PANTRY_TOKEN }} | |
| @@ -1,36 +0,0 @@ | ||
| 1 | name: Releaser | |
| 2 | ||
| 3 | on: | |
| 4 | push: | |
| 5 | tags: | |
| 6 | - 'v*' | |
| 7 | workflow_dispatch: | |
| 8 | ||
| 9 | jobs: | |
| 10 | npm: | |
| 11 | runs-on: ubuntu-latest | |
| 12 | permissions: | |
| 13 | contents: write | |
| 14 | id-token: write | |
| 15 | ||
| 16 | steps: | |
| 17 | - name: Checkout | |
| 18 | uses: actions/checkout@v6.0.1 | |
| 19 | with: | |
| 20 | fetch-depth: 0 | |
| 21 | ||
| 22 | - name: Setup Pantry | |
| 23 | uses: home-lang/pantry/packages/action@main | |
| 24 | ||
| 25 | - name: Install Dependencies | |
| 26 | run: bun install | |
| 27 | ||
| 28 | - name: Publish | |
| 29 | run: pantry publish --npm --access public | |
| 30 | env: | |
| 31 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| 32 | ||
| 33 | - name: Create GitHub Release | |
| 34 | uses: stacksjs/action-releaser@v1.2.9 | |
| 35 | env: | |
| 36 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| @@ -2,16 +2,17 @@ | ||
| 2 | 2 | "name": "@stacksjs/ts-css", |
| 3 | 3 | "type": "module", |
| 4 | 4 | "version": "0.1.4", |
| 5 | "description": "Pure-TypeScript CSS toolkit for Bun/Node — parser, walker, generator, selector engine, and minifier. Zero runtime deps.", | |
| 5 | "description": "Pure-TypeScript CSS toolkit for Bun/Node \u2014 parser, walker, generator, selector engine, and minifier. Zero runtime deps.", | |
| 6 | 6 | "author": "Chris Breuer <chris@stacksjs.org>", |
| 7 | 7 | "license": "MIT", |
| 8 | "homepage": "https://github.com/stacksjs/ts-css#readme", | |
| 8 | "homepage": "https://github.com/cwcss/crosswind/tree/main/packages/toolkit#readme", | |
| 9 | 9 | "repository": { |
| 10 | 10 | "type": "git", |
| 11 | "url": "git+https://github.com/stacksjs/ts-css.git" | |
| 11 | "url": "git+https://github.com/cwcss/crosswind.git", | |
| 12 | "directory": "packages/toolkit" | |
| 12 | 13 | }, |
| 13 | 14 | "bugs": { |
| 14 | "url": "https://github.com/stacksjs/ts-css/issues" | |
| 15 | "url": "https://github.com/cwcss/crosswind/issues" | |
| 15 | 16 | }, |
| 16 | 17 | "keywords": [ |
| 17 | 18 | "typescript", |