diff --git a/.github/actions/environment/action.yml b/.github/actions/environment/action.yml new file mode 100644 index 0000000..efaaadd --- /dev/null +++ b/.github/actions/environment/action.yml @@ -0,0 +1,24 @@ +name: 'Environment setup' +description: 'Sets up the base build typescript environment' + +runs: + using: 'composite' + steps: + - name: Use PNPM + uses: pnpm/action-setup@v2 + with: + version: 9.1.0 + + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: 20.11.0 + cache: 'pnpm' + + - name: Force install TS + shell: 'bash' + run: 'npm --no-update-notifier --no-fund --global install typescript@5.4.5' + + - name: Install dependencies + shell: 'bash' + run: pnpm install diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..2cee569 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,33 @@ +name: Build + +concurrency: + group: $${{github.workflow}}-${{github.event.number || github.ref_name}} + cancel-in-progress: false + +on: + pull_request: + push: + tags: + - 'v*' + branches: + - main + +env: + NODE_OPTIONS: '--max-old-space-size=8192' + +jobs: + Build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Environment Setup + uses: ./.github/actions/environment + + - name: Lint + run: pnpm lint + + - name: Build + run: pnpm build && pnpm prepack +