diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..df3cdf95 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,54 @@ +name: CI Build + +on: + pull_request: + + push: + branches: + - 'master' + - 'develop' # gitflow mainly on hosted runner + + workflow_dispatch: + inputs: + ref: + description: git tag reference to build + required: true + type: string + + workflow_call: + inputs: + ref: + description: git tag reference to build + required: true + type: string + +jobs: + deploy: + runs-on: + - ${{ github.repository_owner != github.actor && 'ubuntu-latest' || 'self-hosted' }} + + steps: + + - name: Checkout Commit + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + + - name: Install pnpm + run: | + corepack enable + corepack prepare pnpm@next-8 --activate + + - name: Install dependencies + run: pnpm install + + - name: Build + run: pnpm build + + - name: Build + run: pnpm run test \ No newline at end of file diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..2edeafb0 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +20 \ No newline at end of file