mirror of
https://github.com/ivuorinen/actions.git
synced 2026-02-03 20:42:45 +00:00
Replace common-cache wrapper with native actions/cache in npm-publish and php-composer, completing the caching optimization campaign. Changes: 1. npm-publish (lines 107-114): - Replace common-cache with actions/cache@v4.3.0 - Use hashFiles() for node_modules cache key - Support multiple lock files (package-lock, yarn.lock, pnpm, bun) 2. php-composer (lines 177-190): - Replace common-cache with actions/cache@v4.3.0 - Use multiline YAML for cleaner path configuration - Use hashFiles() for composer cache key - Support optional cache-directories input Benefits: - Native GitHub Actions functionality (no wrapper overhead) - Better performance (no extra action call) - Simpler maintenance (one less internal action) - Standard approach used by official actions - Built-in hashFiles() more efficient than manual sha256sum Result: - Eliminates all common-cache usage (reduced from 4 to 0 actions) - common-cache action can now be deprecated/removed - Completes caching optimization: 11 → 0 common-cache dependencies Campaign summary: - Phase 1: Inline language-version-detect - Phase 2: Migrate 6 actions to setup-* native caching - Phase 3: Replace go-lint common-cache with actions/cache - Phase 4: Eliminate remaining common-cache (npm, php)
ivuorinen/actions/npm-publish
Publish to NPM
Description
Publishes the package to the NPM registry with configurable scope and registry URL.
Inputs
| name | description | required | default |
|---|---|---|---|
npm_token |
NPM token. |
true |
"" |
registry-url |
Registry URL for publishing. |
false |
https://registry.npmjs.org/ |
scope |
Package scope to use. |
false |
@ivuorinen |
package-version |
The version to publish. |
false |
${{ github.event.release.tag_name }} |
token |
GitHub token for authentication |
false |
"" |
Outputs
| name | description |
|---|---|
registry-url |
Registry URL for publishing. |
scope |
Package scope to use. |
package-version |
The version to publish. |
Runs
This action is a composite action.
Usage
- uses: ivuorinen/actions/npm-publish@main
with:
npm_token:
# NPM token.
#
# Required: true
# Default: ""
registry-url:
# Registry URL for publishing.
#
# Required: false
# Default: https://registry.npmjs.org/
scope:
# Package scope to use.
#
# Required: false
# Default: @ivuorinen
package-version:
# The version to publish.
#
# Required: false
# Default: ${{ github.event.release.tag_name }}
token:
# GitHub token for authentication
#
# Required: false
# Default: ""