diff --git a/.github/workflows/build-package.yml b/.github/workflows/build-package.yml index 45db3d2..c4cd997 100644 --- a/.github/workflows/build-package.yml +++ b/.github/workflows/build-package.yml @@ -1,15 +1,25 @@ name: CI Build + on: [push] + jobs: build: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 + + - name: Setup pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 + - name: Setup Node - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: '18.x' + cache: 'pnpm' registry-url: 'https://registry.npmjs.org' + - name: Install dependencies and build 🔧 run: pnpm install && pnpm build diff --git a/.github/workflows/publish-package-to-npm-dry-run.yml b/.github/workflows/publish-package-to-npm-dry-run.yml index 0cf9fd4..6f3937c 100644 --- a/.github/workflows/publish-package-to-npm-dry-run.yml +++ b/.github/workflows/publish-package-to-npm-dry-run.yml @@ -1,18 +1,29 @@ name: Publish to NPM (dry-run) + on: [push] + jobs: build: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 + + - name: Setup pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 + - name: Setup Node - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: '18.x' + cache: 'pnpm' registry-url: 'https://registry.npmjs.org' + - name: Install dependencies and build 🔧 run: pnpm install && pnpm build + - name: Publish package on NPM 📦 run: npm publish --dry-run env: diff --git a/.github/workflows/publish-package-to-npm.yml b/.github/workflows/publish-package-to-npm.yml index 3ce18fa..a53b933 100644 --- a/.github/workflows/publish-package-to-npm.yml +++ b/.github/workflows/publish-package-to-npm.yml @@ -1,20 +1,31 @@ name: Publish to NPM + on: release: types: [created] + jobs: build: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 + + - name: Setup pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 + - name: Setup Node - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: '18.x' + cache: 'pnpm' registry-url: 'https://registry.npmjs.org' + - name: Install dependencies and build 🔧 run: pnpm install && pnpm build + - name: Publish package on NPM 📦 run: npm publish env: