diff --git a/.github/workflows/tsdown.yml b/.github/workflows/tsdown.yml new file mode 100644 index 0000000..508caa8 --- /dev/null +++ b/.github/workflows/tsdown.yml @@ -0,0 +1,29 @@ +name: tsdown + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + verify: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 + + - name: Install dependencies + run: pnpm install + + - name: Verify build + run: pnpm run build \ No newline at end of file diff --git a/README.md b/README.md index 652ccae..9a0e59d 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,35 @@ jobs: DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_MERGEBOT }} ``` +## ts down + +This workflow verifies that your TypeScript project builds successfully. It runs on push and pull requests to ensure your project's build process is working correctly. + +### Usage + +Add the following to your repository's workflow: + +```yml +name: Verify Build + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + verify: + uses: bombshell-dev/automation/.github/workflows/tsdown.yml@main +``` + +The workflow will: +1. Set up Node.js and pnpm +2. Install project dependencies +3. Run the project's build script to verify it builds successfully + +This ensures your project's build process is working correctly before merging changes. + ## Acknowledgements This repository borrows heavily from [`withastro/automation`](https://github.com/withastro/automation), published under the MIT License—Copyright (c) 2023 Astro.