From fe0387a7dca46c5a86341a2538d6d9328f5ae258 Mon Sep 17 00:00:00 2001 From: Matthew Sevey <15232757+MSevey@users.noreply.github.com> Date: Mon, 23 Sep 2024 12:39:34 -0400 Subject: [PATCH] feat(ci): Add semantic PR action and semantic release (#106) --- .github/workflows/semantic_pull_request.yml | 20 +++++++++++++++++ .github/workflows/semantic_release.yml | 24 +++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 .github/workflows/semantic_pull_request.yml create mode 100644 .github/workflows/semantic_release.yml diff --git a/.github/workflows/semantic_pull_request.yml b/.github/workflows/semantic_pull_request.yml new file mode 100644 index 0000000..e11fe30 --- /dev/null +++ b/.github/workflows/semantic_pull_request.yml @@ -0,0 +1,20 @@ +name: Semantic Pull Request + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + +permissions: + pull-requests: read + +jobs: + main: + name: conventional-commit-pr-title + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/semantic_release.yml b/.github/workflows/semantic_release.yml new file mode 100644 index 0000000..c5f1d5d --- /dev/null +++ b/.github/workflows/semantic_release.yml @@ -0,0 +1,24 @@ +name: Semantic Release + +on: + push: + branches: + - main + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Configure Semantic Release + # Work around for non npm project + # REF: https://github.com/cycjimmy/semantic-release-action/issues/115#issuecomment-1817264419 + run: echo '{"branches":[],"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/github"]}' > .releaserc.json + - name: Create Release + uses: cycjimmy/semantic-release-action@v4 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + branches: | + ["main"]