Skip to content

Commit

Permalink
ci: add github actions files for release and lint/build checks
Browse files Browse the repository at this point in the history
  • Loading branch information
lars-berger committed Oct 17, 2024
1 parent 4540107 commit 757425e
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Build

on: push

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: glzr-io/actions/setup-pnpm@main
with:
checkout: true
node-version: 20

- run: pnpm build
14 changes: 14 additions & 0 deletions .github/workflows/lint-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Lint check

on: push

jobs:
lint-check:
runs-on: ubuntu-latest
steps:
- uses: glzr-io/actions/setup-pnpm@main
with:
checkout: true
node-version: 20

- run: pnpm lint
13 changes: 13 additions & 0 deletions .github/workflows/pr-title-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: PR title check

on:
pull_request:
types: [opened, edited, synchronize, reopened]

jobs:
pr-title-check:
runs-on: ubuntu-latest
steps:
- uses: glzr-io/actions/semantic-prs@main
with:
gh-token: ${{ secrets.GITHUB_TOKEN }}
39 changes: 39 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release

on:
workflow_dispatch:
inputs:
draft-release:
type: boolean
default: false
description: Whether to publish the release as a draft.

permissions:
contents: write
issues: write
pull-requests: write
id-token: write

concurrency:
group: release

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: glzr-io/actions/setup-pnpm@main
with:
checkout: true
node-version: 20
fetch-depth: 0

- run: pnpm build

- uses: glzr-io/actions/semantic-release@main
with:
gh-publish: true
gh-draft-release: ${{ inputs.draft-release }}
gh-token: ${{ github.token }}
npm-publish: true
npm-token: ${{ secrets.NPM_TOKEN }}
npm-package-manager: pnpm

0 comments on commit 757425e

Please sign in to comment.