Skip to content

Commit

Permalink
Merge release/1.0.0-beta.9 into master
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored May 13, 2021
2 parents 2c177fc + 309c89d commit bbdbffc
Show file tree
Hide file tree
Showing 7 changed files with 427 additions and 490 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,9 @@ jobs:
- name: Build - Composeables
run: yarn build:composables

- name: Create .npmrc
shell: bash
run: |
echo "//registry.npmjs.org/:_authToken=${INPUT_TOKEN}\nregistry=https://registry.npmjs.org/\n@vue-storefront:registry=https://registry.npmjs.org/\n" > .npmrc
- name: Copy .npmrc to root
shell: bash
run: cp .npmrc ~/.npmrc
run: cp scripts/.npmrc ~/.npmrc

- name: Publish Packages
shell: bash
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"@graphql-codegen/cli": "1.21.4",
"@graphql-codegen/typescript": "1.22.0",
"@graphql-codegen/typescript-operations": "^1.17.16",
"@jsdevtools/npm-publish": "^1.4.3",
"@manypkg/cli": "^0.17.0",
"@rollup/plugin-node-resolve": "^13.0.0",
"@semantic-release/git": "^9.0.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/api-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"server/**/*"
],
"publishConfig": {
"access": "public"
"access": "public",
"registry":"https://registry.npmjs.org"
}
}
3 changes: 2 additions & 1 deletion packages/composables/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"nuxt/**/*"
],
"publishConfig": {
"access": "public"
"access": "public",
"registry":"https://registry.npmjs.org"
}
}
3 changes: 3 additions & 0 deletions scripts/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
//registry.npmjs.org/:_authToken=${INPUT_TOKEN}
registry=https://registry.npmjs.org/
@vue-storefront:registry=https://registry.npmjs.org/
34 changes: 13 additions & 21 deletions scripts/lib/publishPackages.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const npmPublish = require('@jsdevtools/npm-publish');
const { exec } = require("child_process");
const path = require('path');
const labelsToRemove = ['release'];
const npmLabelBase = 'NPM:';
Expand All @@ -17,27 +17,19 @@ const publishPackages = (labels, token) => {

const baseComposablesPath = path.join(process.cwd(), 'packages', 'composables');

const basePublishOptions = {
token: token,
tag: npmTag,
access: 'public',
checkVersion: true,
// registry: 'https://registry.npmjs.org/'
};
npmPublish({
package: path.resolve(baseApiClientPath, './package.json'),
...basePublishOptions,
}).then((apiReturn) => {
npmPublish({
package: path.resolve(baseComposablesPath, './package.json'),
...basePublishOptions,
}).then((composerReturn) => {
resolve({
apiReturn,
composerReturn,
})
[baseApiClientPath, baseComposablesPath].forEach((p) => {
exec(`npm publish ${p} --access public --tag ${npmTag}`, (error, stdout, stderr) => {
if (error) {
console.log(`error: ${error.message}`);
return;
}
if (stderr) {
console.log(`stderr: ${stderr}`);
return;
}
console.log(`stdout: ${stdout}`);
});
})
});
}
} catch(e){
reject(e);
Expand Down
866 changes: 406 additions & 460 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit bbdbffc

Please sign in to comment.