Skip to content

Commit

Permalink
ci(release): move semantic-release files to dedicated folder (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
Djaytan authored Jan 16, 2025
1 parent 3534a73 commit 5f9d5f3
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 15 deletions.
File renamed without changes.
File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "continuous-integration",
"name": "semantic-release",
"devDependencies": {
"@commitlint/cli": "19.6.1",
"@commitlint/config-conventional": "19.6.0",
Expand Down
File renamed without changes.
15 changes: 6 additions & 9 deletions .github/workflows/conventional-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit 5f9d5f3

Please sign in to comment.