From 5f9d5f31b92df53189f26c761ff27a4c5d343872 Mon Sep 17 00:00:00 2001 From: Djaytan <26904516+Djaytan@users.noreply.github.com> Date: Thu, 16 Jan 2025 22:46:53 +0100 Subject: [PATCH] ci(release): move semantic-release files to dedicated folder (#134) --- .github/{ => semantic-release}/.npmrc | 0 .../{ => semantic-release}/commitlint.config.js | 0 .github/{ => semantic-release}/package-lock.json | 4 ++-- .github/{ => semantic-release}/package.json | 2 +- .github/{ => semantic-release}/release.config.js | 0 .github/workflows/conventional-commit.yml | 15 ++++++--------- .github/workflows/release.yaml | 6 +++--- 7 files changed, 12 insertions(+), 15 deletions(-) rename .github/{ => semantic-release}/.npmrc (100%) rename .github/{ => semantic-release}/commitlint.config.js (100%) rename .github/{ => semantic-release}/package-lock.json (99%) rename .github/{ => semantic-release}/package.json (93%) rename .github/{ => semantic-release}/release.config.js (100%) diff --git a/.github/.npmrc b/.github/semantic-release/.npmrc similarity index 100% rename from .github/.npmrc rename to .github/semantic-release/.npmrc diff --git a/.github/commitlint.config.js b/.github/semantic-release/commitlint.config.js similarity index 100% rename from .github/commitlint.config.js rename to .github/semantic-release/commitlint.config.js diff --git a/.github/package-lock.json b/.github/semantic-release/package-lock.json similarity index 99% rename from .github/package-lock.json rename to .github/semantic-release/package-lock.json index a44d28b..5287571 100644 --- a/.github/package-lock.json +++ b/.github/semantic-release/package-lock.json @@ -1,10 +1,10 @@ { - "name": "continuous-integration", + "name": "semantic-release", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "continuous-integration", + "name": "semantic-release", "devDependencies": { "@commitlint/cli": "19.6.1", "@commitlint/config-conventional": "19.6.0", diff --git a/.github/package.json b/.github/semantic-release/package.json similarity index 93% rename from .github/package.json rename to .github/semantic-release/package.json index ee509b3..3f975ee 100644 --- a/.github/package.json +++ b/.github/semantic-release/package.json @@ -1,5 +1,5 @@ { - "name": "continuous-integration", + "name": "semantic-release", "devDependencies": { "@commitlint/cli": "19.6.1", "@commitlint/config-conventional": "19.6.0", diff --git a/.github/release.config.js b/.github/semantic-release/release.config.js similarity index 100% rename from .github/release.config.js rename to .github/semantic-release/release.config.js diff --git a/.github/workflows/conventional-commit.yml b/.github/workflows/conventional-commit.yml index 47b7b7c..50167ad 100644 --- a/.github/workflows/conventional-commit.yml +++ b/.github/workflows/conventional-commit.yml @@ -18,9 +18,6 @@ jobs: permissions: contents: read - env: - COMMITLINT_CONFIG_FILE: ${{ github.workspace }}/.github/commitlint.config.js - steps: - name: Harden runner uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 @@ -43,21 +40,21 @@ jobs: with: node-version: lts/jod cache: npm - cache-dependency-path: .github/package-lock.json + cache-dependency-path: .github/semantic-release/package-lock.json - name: Install commitlint - working-directory: .github/ + working-directory: .github/semantic-release/ run: npm clean-install - name: Validate current commit (last commit) with commitlint if: ${{ github.event_name != 'pull_request' }} - working-directory: .github/ - run: npx --no-install commitlint --config "${COMMITLINT_CONFIG_FILE}" --verbose --last + working-directory: .github/semantic-release/ + run: npx --no-install commitlint --verbose --last - name: Validate PR commits with commitlint if: ${{ github.event_name == 'pull_request' }} - working-directory: .github/ + working-directory: .github/semantic-release/ run: | - npx --no-install commitlint --config "${COMMITLINT_CONFIG_FILE}" --verbose \ + npx --no-install commitlint --verbose \ --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} \ --to ${{ github.event.pull_request.head.sha }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 59a6af8..5ef0f7c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -45,10 +45,10 @@ jobs: with: node-version: lts/jod cache: npm - cache-dependency-path: .github/package-lock.json + cache-dependency-path: .github/semantic-release/package-lock.json - name: Install semantic-release - working-directory: .github/ + working-directory: .github/semantic-release/ run: npm clean-install - name: Setup Java @@ -70,5 +70,5 @@ jobs: CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }} CENTRAL_TOKEN: ${{ secrets.CENTRAL_TOKEN }} MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} - working-directory: .github/ + working-directory: .github/semantic-release/ run: npx --no-install semantic-release