From 04e7c92c874043b27bbbb8ad2fc09f3d91ed44a3 Mon Sep 17 00:00:00 2001 From: "Kenta Goto (k.goto)" <24818752+go-to-k@users.noreply.github.com> Date: Sat, 17 Aug 2024 02:33:09 +0900 Subject: [PATCH] ci: PR-Lint for PR titles (#235) * ci: PR-Lint for PR titles * change filename --- .github/workflows/{release.yml => manual.yml} | 6 +-- .github/workflows/semantic-pull-request.yml | 42 +++++++++++++++++++ 2 files changed, 45 insertions(+), 3 deletions(-) rename .github/workflows/{release.yml => manual.yml} (90%) create mode 100644 .github/workflows/semantic-pull-request.yml diff --git a/.github/workflows/release.yml b/.github/workflows/manual.yml similarity index 90% rename from .github/workflows/release.yml rename to .github/workflows/manual.yml index 54ead4d..cad60a6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/manual.yml @@ -1,11 +1,11 @@ # for manual release (No triggering when tagpr is used.) -name: release +name: manual on: push: tags: - "v[0-9]+.[0-9]+.[0-9]+" jobs: - goreleaser: + manual: runs-on: ubuntu-latest steps: - name: Checkout @@ -15,4 +15,4 @@ jobs: - uses: ./.github/actions/release with: github-token: ${{ secrets.GITHUB_TOKEN }} - homebrew-tap-github-token: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} + homebrew-tap-github-token: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/semantic-pull-request.yml b/.github/workflows/semantic-pull-request.yml new file mode 100644 index 0000000..acce435 --- /dev/null +++ b/.github/workflows/semantic-pull-request.yml @@ -0,0 +1,42 @@ +name: "Lint PR" + +on: + pull_request: + types: + - opened + - edited + - synchronize + - reopened + +permissions: + pull-requests: read + +jobs: + main: + name: Validate PR title + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + types: | + feat + fix + chore + docs + style + refactor + perf + test + ci + scopes: | + deps + main + app + action + io + types + version + client + requireScope: false \ No newline at end of file