-
Select Topic AreaQuestion BodyDescription:
Repository: garotm/awesome-cursorrules-dynamic Workflow File (.github/workflows/publish.yml): name: Publish Package
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
cache: 'npm'
cache-dependency-path: vscode-extension/package-lock.json
registry-url: 'https://npm.pkg.github.com'
scope: '@garotm'
- name: Make CI script executable
run: chmod +x scripts/ci.sh
- name: Run CI checks
run: ./scripts/ci.sh
- name: Configure npm for publishing
working-directory: ./vscode-extension
run: |
echo "@garotm:registry=https://npm.pkg.github.com" > .npmrc
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc
- name: Publish to GitHub Packages
working-directory: ./vscode-extension
run: |
npm ci
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} Package.json (vscode-extension/package.json): {
"name": "cursor-rules-dynamic",
"version": "1.0.0",
"publishConfig": {
"registry": "https://npm.pkg.github.com",
"name": "@garotm/cursor-rules-dynamic"
},
"dependencies": {
"ajv": "^8.12.0"
},
"devDependencies": {
"@types/node": "^20.17.12",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"eslint": "^8.57.0",
"typescript": "^5.3.3"
}
} Steps Taken:
Despite these steps, the error persists. Can anyone point out what I'm missing here? -garotm |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
The most critical issue is in your package.json. There's a mismatch between your name field and publishConfig.name:
|
Beta Was this translation helpful? Give feedback.
-
that makes sense however, I have it this way: if I change it, then my release workflow fails? Clearly, I have no idea what I am doing (which is the point entirely), but still "think" this should be pretty easy? You can see here where both were failing and then when the release.yml started working but the publish.yml never working... Seems I am going back and forth with the naming. https://github.com/garotm/awesome-cursorrules-dynamic/actions Additionally, locally, which may be ver misleading, if I make this change, it fails:
but if I change that back to
However if I change the publishConfig name from it still works, locally:
I also love how you said "most critical" lol I can only imagine what else is wrong in here... Thanks! |
Beta Was this translation helpful? Give feedback.
-
After all that it really came down to me over-thinking something I really don't know much about, moral of the story, MVP! lol https://github.com/garotm/awesome-cursorrules-dynamic/pkgs/npm/cursor-rules-dynamic Thanks !! -garotm |
Beta Was this translation helpful? Give feedback.
After all that it really came down to me over-thinking something I really don't know much about, moral of the story, MVP! lol
https://github.com/garotm/awesome-cursorrules-dynamic/pkgs/npm/cursor-rules-dynamic
Thanks !!
-garotm