Skip to content

Commit

Permalink
fix: 🐛 move to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
Evert De Spiegeleer committed Jan 12, 2024
1 parent d77d661 commit a00c501
Show file tree
Hide file tree
Showing 9 changed files with 1,979 additions and 9,383 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,15 @@ jobs:
- name: Version the packages
id: version
run: |
export VERSION=$(npm version --no-commit-hooks --no-git-tag-version prerelease --preid $(echo "${{ steps.extract_branch.outputs.branch }}" | tr -cs 'a-zA-Z0-9-' '-' | sed 's/-$//'))
yarn workspaces foreach -A -t --no-private exec "npm version $VERSION --no-commit-hooks --no-git-tag-version"
./scripts/version.sh prerelease --preid $(echo "${{ steps.extract_branch.outputs.branch }}" | tr -cs 'a-zA-Z0-9-' '-' | sed 's/-$//'))
export VERSION=$(cat package.json | jq -r '.version')
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Publish to npm
run: |
echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_PUBLISH_TOKEN}}" >> ~/.npmrc
echo "registry=https://registry.npmjs.org" >> ~/.npmrc
npm publish --access=public --tag prerelease
npm publish --workspaces --access=public --tag prerelease
rm -f ~/.npmrc
- name: Commit and push changes
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,18 @@ jobs:
- name: Configure Git
uses: fregante/setup-git-user@v1

- name: Version the package
- name: Version the packages
id: version
run: |
export VERSION=$(npm version --no-commit-hooks --no-git-tag-version ${{ github.event.inputs.release-type }})
yarn workspaces foreach -A -t --no-private exec "npm version $VERSION --no-commit-hooks --no-git-tag-version"
./scripts/version.sh ${{ github.event.inputs.release-type }}
export VERSION=$(cat package.json | jq -r '.version')
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Publish to npm
run: |
echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_PUBLISH_TOKEN}}" >> ~/.npmrc
echo "registry=https://registry.npmjs.org" >> ~/.npmrc
npm publish --access=public
npm publish --workspaces --access=public
rm -f ~/.npmrc
- name: Commit and push changes
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn run sync:readme
npm run sync:readme
git add ./*.md

4 changes: 0 additions & 4 deletions lerna.json

This file was deleted.

Loading

0 comments on commit a00c501

Please sign in to comment.