Skip to content

Commit

Permalink
fix: npm version in workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
brianzinn committed Apr 11, 2022
1 parent 52e451b commit d403829
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
default: ' ()'
# push:
# branches: [ master ]
# NOTE: workspaces have a bunch of issues with npm version! 'npm version' doesn't add a commit + tag :(

jobs:
release:
Expand All @@ -36,14 +37,18 @@ jobs:
npm run build
npm run test:coverage
- name: version-changelog-commit
working-directory: ./packages/react-babylonjs
run: |
npm version ${{ github.event.inputs.npmVersion }} -w packages/react-babylonjs
git status
npm version ${{ github.event.inputs.npmVersion }} -m "release %s :package:${{ github.event.inputs.comment }}" --git-tag-version
PACKAGE_VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g' | tr -d '[[:space:]]')
git add packages/react-babylonjs/package.json
git commit -m "release ${PACKAGE_VERSION} :package:${{ github.event.inputs.comment }}"
git status
git tag ${PACKAGE_VERSION}
git push --follow-tags
PACKAGE_VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g' | tr -d '[[:space:]]')
git status
sleep 1m
cd packages/react-babylonjs
../../node_modules/.bin/gren release --tags=v${PACKAGE_VERSION}
env:
GREN_GITHUB_TOKEN: ${{ secrets.GREN_GITHUB_TOKEN }}
Expand Down

0 comments on commit d403829

Please sign in to comment.