diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..5ec992e --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,41 @@ +name: CI build +on: + push: + branches: main + pull_request: + branches: main + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: DerYeger/pnpm-setup-action@master + with: + node-version: latest + - name: Build + run: pnpm build-only + # Separate build and type check, + # because *.d.ts files aren't generated before build + - name: Type Check + run: pnpm type-check + - name: Compress action step + uses: a7ul/tar-action@v1.1.0 + id: compress + with: + command: c + cwd: ./ + files: | + ./dist + outPath: dist.tar.gz + - name: Archive build artifacts + uses: actions/upload-artifact@v4 + with: + name: build + path: | + ./dist.tar.gz + - name: Release + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/') + with: + files: dist.tar.gz diff --git a/package.json b/package.json index 18e8ac7..beb71b8 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "0.0.0", "private": true, "type": "module", + "packageManager": "pnpm@9.14.3", "scripts": { "dev": "vite", "build": "run-p type-check \"build-only {@}\" --",