Skip to content

Commit

Permalink
chore: set npm auth from the pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Space Corp Engineering committed Jul 10, 2024
1 parent 803f0e0 commit e6076d2
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/npm-publish-github-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ jobs:
- run: pnpm install
- run: echo "publishing version ${{ env.RELEASE_VERSION }}"
- run: pnpm version ${{ env.RELEASE_VERSION }}
- run: npm config set //registry.npmjs.org/:_authToken ${{secrets.NPM_PUBLISH_TOKEN}}
- run: pnpm config set //registry.npmjs.org/:_authToken ${{secrets.NPM_PUBLISH_TOKEN}}
- run: npm profile get
- run: pnpm publish:package
env:
node-version: ${{ matrix.node-version }}
Expand Down
7 changes: 5 additions & 2 deletions packages/gleamy/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gleamy",
"description": "Create a reactive shiny element in different materials",
"version": "2.0.2",
"version": "2.0.10-beta",
"license": "MIT",
"private": false,
"sideEffects": false,
Expand All @@ -20,6 +20,9 @@
},
"type": "module",
"module": "dist/esm/index.mjs",
"directories": {
"dist": "dist/**/*"
},
"files": [
"dist",
"README.md",
Expand Down Expand Up @@ -58,7 +61,7 @@
"test": "jest",
"prepack": "node ./scripts/prepare.cjs",
"postpack": "node ./scripts/postpack.cjs",
"publish:package": "pnpm publish --no-git-checks --access=public",
"publish:package": "pnpm publish --force --no-git-checks --access=public",
"dry-run": "pnpm publish --dry-run --no-git-checks --access=public"
},
"peerDependencies": {
Expand Down
7 changes: 3 additions & 4 deletions packages/gleamy/scripts/entitiesToPack.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{
"entitiesToPack": [
"readme-assets",
"dist",
"CODE_OF_CONDUCT.md",
"CONTRIBUTING.md",
"FUNDING.md",
"LICENSE.md",
"README.md",
"SECURITY.md",
"dist"
"SECURITY.md"
]
}
}
2 changes: 1 addition & 1 deletion packages/gleamy/scripts/postpack.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ console.log('Gleamy: cleaning up.');
try {
result.entitiesToPack.forEach((entity) => {
if (entity === "dist") {
return void(0);
return void (0);
}
fs.rmSync(`../../packages/gleamy/${entity}`, { recursive: true });
});
Expand Down
6 changes: 5 additions & 1 deletion packages/gleamy/scripts/prepare.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ try {
result.entitiesToPack.forEach((entity) => {
console.log(entity);
if (entity === "dist") {
return void(0);
return void (0);
}
fs.cpSync(`../../${entity}`, `../../packages/gleamy/${entity}`, {
recursive: true,
});
});

fs.cpSync(`./dist`, `../../packages/gleamy/dist`, {
recursive: true,
});
} catch (error) {
console.error(error);
}

0 comments on commit e6076d2

Please sign in to comment.