Skip to content

Commit

Permalink
Merge pull request #1 from monax/gh-actions
Browse files Browse the repository at this point in the history
Add GH actions
  • Loading branch information
danielz-mnx committed May 9, 2024
2 parents 6ab1eb1 + 2e263da commit 00d5133
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 4 deletions.
24 changes: 24 additions & 0 deletions .github/actions/environment/action.yml
Original file line number Diff line number Diff line change
@@ -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 [email protected]'

- name: Install dependencies
shell: 'bash'
run: pnpm install
42 changes: 42 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
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:
Lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Environment Setup
uses: ./.github/actions/environment

- name: Lint
run: pnpm lint

Build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Environment Setup
uses: ./.github/actions/environment

- name: Build
run: pnpm build && pnpm prepack

8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 00d5133

Please sign in to comment.