[fix] Address workflow review feedback

- Add || true to git stash to handle empty working tree
- Use node-version-file: '.nvmrc' instead of lts/* to match repo
  Node 24 requirement
- Fix relative links in README (use ./ since README is in same dir)
- Fix pre-release version example to use valid X.Y.Z format
This commit is contained in:
snomiao
2026-03-14 06:10:17 +00:00
parent 24d8a9ce3a
commit fb5f5bd90e
3 changed files with 12 additions and 12 deletions

View File

@@ -147,22 +147,22 @@ gh workflow run manual-api-changelog.yaml \
#### 3. Test Upcoming Changes
Compare current `main` branch against the latest release (requires creating a temporary tag):
Compare current `main` branch against the latest release (requires creating a temporary tag with valid semver format):
```bash
# Create temporary tag for current main
git tag v1.31.0-preview
git push origin v1.31.0-preview
git tag v1.31.0
git push origin v1.31.0
# Run comparison
gh workflow run manual-api-changelog.yaml \
-f from_version=1.30.2 \
-f to_version=1.31.0-preview \
-f to_version=1.31.0 \
-f create_pr=false
# Clean up temporary tag
git tag -d v1.31.0-preview
git push origin :refs/tags/v1.31.0-preview
git tag -d v1.31.0
git push origin :refs/tags/v1.31.0
```
#### 4. Audit Historical Changes
@@ -199,8 +199,8 @@ If validation fails, the workflow exits early with a clear error message.
### Related Workflows
- **[Release API Changelogs](.github/workflows/release-api-changelogs.yaml)**: Automatic changelog generation triggered by NPM releases
- **[Release NPM Types](.github/workflows/release-npm-types.yaml)**: Publishes type definitions and triggers automatic changelog
- **[Release API Changelogs](./release-api-changelogs.yaml)**: Automatic changelog generation triggered by NPM releases
- **[Release NPM Types](./release-npm-types.yaml)**: Publishes type definitions and triggers automatic changelog
### Troubleshooting

View File

@@ -83,7 +83,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 'lts/*'
node-version-file: '.nvmrc'
cache: 'pnpm'
- name: Install dependencies

View File

@@ -33,7 +33,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 'lts/*'
node-version-file: '.nvmrc'
cache: 'pnpm'
- name: Install dependencies
@@ -99,8 +99,8 @@ jobs:
- name: Checkout previous version
if: steps.previous_version.outputs.tag != ''
run: |
# Stash current changes
git stash
# Stash current changes (may be empty)
git stash || true
# Checkout previous version
git checkout ${{ steps.previous_version.outputs.tag }}