From 032b14e2ab9d47c43f45305c8c3d035fab777989 Mon Sep 17 00:00:00 2001 From: Thomas Deinhamer Date: Sat, 19 Jul 2025 12:09:34 +0200 Subject: [PATCH] Add github workflows --- .github/workflows/source.yaml | 55 +++++++++++++++++++++++++++++++++++ .github/workflows/title.yaml | 30 +++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 .github/workflows/source.yaml create mode 100644 .github/workflows/title.yaml diff --git a/.github/workflows/source.yaml b/.github/workflows/source.yaml new file mode 100644 index 0000000..74b7a5e --- /dev/null +++ b/.github/workflows/source.yaml @@ -0,0 +1,55 @@ +name: SOURCE + +on: + workflow_call: + merge_group: + pull_request: + push: + branches: + - main + +jobs: + lint: + name: lint source + runs-on: ubuntu-latest + steps: + - name: checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: setup package manager + uses: pnpm/action-setup@v4 + with: + run_install: false + - name: install node + uses: actions/setup-node@v4 + with: + cache: 'pnpm' + check-latest: true + node-version-file: '.nvmrc' + - name: install dependencies + run: pnpm install + - name: lint source + run: pnpm lint + build: + name: build source + runs-on: ubuntu-latest + steps: + - name: checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: setup package manager + uses: pnpm/action-setup@v4 + with: + run_install: false + - name: install node + uses: actions/setup-node@v4 + with: + cache: 'pnpm' + check-latest: true + node-version-file: '.nvmrc' + - name: install dependencies + run: pnpm install + - name: build source + run: pnpm build diff --git a/.github/workflows/title.yaml b/.github/workflows/title.yaml new file mode 100644 index 0000000..c6deac3 --- /dev/null +++ b/.github/workflows/title.yaml @@ -0,0 +1,30 @@ +name: TITLE + +on: + merge_group: + pull_request: + types: [opened, reopened, edited, synchronize] + +jobs: + lint: + name: lint title + runs-on: ubuntu-latest + steps: + - name: checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: setup package manager + uses: pnpm/action-setup@v4 + with: + run_install: false + - name: install node + uses: actions/setup-node@v4 + with: + cache: 'pnpm' + check-latest: true + node-version-file: '.nvmrc' + - name: install dependencies + run: pnpm install + - name: lint title + run: echo "${{ github.event.pull_request.title }}" | pnpm exec commitlint --extends @somehow-digital/commitlint-config/conventional