From 76a27ae25609178c1bd47c947b9f1a082c791d61 Mon Sep 17 00:00:00 2001 From: Markos Gogoulos Date: Fri, 6 Feb 2026 18:40:50 +0200 Subject: [PATCH] feat: add semantic release github actions --- .github/workflows/semantic-pull-request.yaml | 22 +++++++++ .github/workflows/semantic-release.yaml | 47 ++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 .github/workflows/semantic-pull-request.yaml create mode 100644 .github/workflows/semantic-release.yaml diff --git a/.github/workflows/semantic-pull-request.yaml b/.github/workflows/semantic-pull-request.yaml new file mode 100644 index 00000000..83ee2da0 --- /dev/null +++ b/.github/workflows/semantic-pull-request.yaml @@ -0,0 +1,22 @@ +name: "Lint PR" + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + - reopened + +permissions: + pull-requests: read + +jobs: + main: + name: Validate PR title + runs-on: ubuntu-latest + environment: dev + steps: + - uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/semantic-release.yaml b/.github/workflows/semantic-release.yaml new file mode 100644 index 00000000..47dcdf98 --- /dev/null +++ b/.github/workflows/semantic-release.yaml @@ -0,0 +1,47 @@ +name: Semantic Release + +on: + push: + branches: + - main + +permissions: + contents: write + issues: write + +jobs: + semantic-release: + runs-on: ubuntu-latest + environment: dev + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + persist-credentials: false + + - name: Setup SSH + uses: webfactory/ssh-agent@v0.8.0 + with: + ssh-private-key: ${{ secrets.GA_DEPLOY_KEY }} + + # use SSH url to ensure git commit using a deploy key bypasses the main + # branch protection rule + - name: Configure Git for SSH Push + run: git remote set-url origin "git@github.com:${{ github.repository }}.git" + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "lts/*" + + - name: Install Dependencies + run: npm clean-install + + - name: Verify the integrity of provenance attestations and registry signatures for installed dependencies + run: npm audit signatures + + - name: Run Semantic Release + run: npx semantic-release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}