Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #20

Merged
merged 6 commits into from
Jun 30, 2024
Merged

Dev #20

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,24 @@ jobs:
- name: Configure npm for GitHub Packages
run: |
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc
echo "@wojtekKrol:registry=https://npm.pkg.github.com" >> ~/.npmrc
echo "@wojtekkrol:registry=https://npm.pkg.github.com" >> ~/.npmrc

- name: Insert repository owner as scope into package name
run: |
cp package.json package.json.bak
node <<EOF
const fs = require('fs').promises;
fs.readFile('package.json', 'utf8').then((data) => JSON.parse(data)).then((json) => {
json.name = '@' + process.env.GITHUB_REPOSITORY.split('/')[0].toLowerCase() + '/' + json.name;
console.info('Package name changed to %s', json.name);
return fs.writeFile('package.json', JSON.stringify(json, null, 2), 'utf8');
}).catch(error => {
console.error(error);
process.exit(1);
});
EOF
env:
GITHUB_REPOSITORY: ${{ github.repository }}

- name: Insert repository owner as scope into package name
run: |
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zod-to-fields",
"version": "0.1.32",
"version": "0.1.33",
"description": "Turn your Zod schemas into configurable field arrays for easy integration with HTML, React, Vue, and more.",
"main": "lib/cjs/index.js",
"module": "lib/esm/index.js",
Expand All @@ -12,7 +12,7 @@
"bugs": "https://github.com/wojtekKrol/zod-to-fields/issues"
},
"publishConfig": {
"registry": "https://npm.pkg.github.com/@wojtekKrol"
"registry": "https://npm.pkg.github.com/@wojtekkrol"
},
"engines": {
"node": ">=18"
Expand Down Expand Up @@ -64,7 +64,7 @@
"coverage": "jest --coverage",
"test": "jest",
"publish:npm": "pnpm publish --access public",
"publish:github": "pnpm publish --registry=https://npm.pkg.github.com/"
"publish:github": "pnpm publish --registry=https://npm.pkg.github.com/ --no-git-checks"
},
"devDependencies": {
"@changesets/cli": "^2.27.6",
Expand Down
Loading