Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2548057a6c |
@@ -1,24 +1,43 @@
|
|||||||
name: "Setup semantic-release"
|
name: 'Setup Semantic Release'
|
||||||
description: "Prepare Node.js and install semantic-release dependencies"
|
description: 'Setup Node.js and install semantic-release with all necessary plugins'
|
||||||
|
author: 'zertys'
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
node-version:
|
node-version:
|
||||||
description: "Node.js version"
|
description: 'Node.js version to setup'
|
||||||
required: false
|
required: false
|
||||||
default: "20"
|
default: '24'
|
||||||
install-command:
|
|
||||||
description: "Command used to install project dependencies"
|
|
||||||
required: false
|
|
||||||
default: "npm ci"
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: 'composite'
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: ${{ inputs.node-version }}
|
node-version: ${{ inputs.node-version }}
|
||||||
cache: "npm"
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Cache semantic-release dependencies
|
||||||
|
id: cache-semantic-release
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ${{ github.action_path }}/node_modules
|
||||||
|
key: semantic-release-${{ runner.os }}-node${{ inputs.node-version }}-${{ hashFiles(format('{0}/package.json', github.action_path)) }}
|
||||||
|
|
||||||
|
- name: Install semantic-release dependencies
|
||||||
|
if: steps.cache-semantic-release.outputs.cache-hit != 'true'
|
||||||
|
shell: bash
|
||||||
|
working-directory: ${{ github.action_path }}
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
npm ci && npm cache clean --force
|
||||||
|
echo "✓ Semantic-release dependencies installed"
|
||||||
|
|
||||||
|
- name: Add semantic-release to PATH
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
npm install --no-save semantic-release @semantic-release/commit-analyzer @semantic-release/changelog @semantic-release/git @semantic-release/exec @semantic-release/npm
|
echo "${{ github.action_path }}/node_modules/.bin" >> $GITHUB_PATH
|
||||||
|
echo "✓ Semantic-release added to PATH"
|
||||||
|
|
||||||
|
branding:
|
||||||
|
icon: 'tag'
|
||||||
|
color: 'purple'
|
||||||
6359
setup-semantic-release/package-lock.json
generated
Normal file
6359
setup-semantic-release/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
13
setup-semantic-release/package.json
Normal file
13
setup-semantic-release/package.json
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"name": "semantic-release",
|
||||||
|
"dependencies": {
|
||||||
|
"@semantic-release/changelog": "^6.0.3",
|
||||||
|
"@semantic-release/exec": "^7.1.0",
|
||||||
|
"@semantic-release/git": "^10.0.1",
|
||||||
|
"@semantic-release/npm": "^13.1.3",
|
||||||
|
"@terrestris/maven-semantic-release": "^3.1.0",
|
||||||
|
"conventional-changelog-conventionalcommits": "^9.1.0",
|
||||||
|
"semantic-release": "^25.0.3",
|
||||||
|
"tsx": "^4.21.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user