Skip to content

Commit

Permalink
Merge pull request #32 from oslabs-beta/semantic-release
Browse files Browse the repository at this point in the history
fix: 🐛 Deleted branches option from scripts
  • Loading branch information
YouruiR authored Jul 15, 2023
2 parents ad47eff + f6e7f4f commit 2b31811
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/npmCD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
else
echo "is_merged=false" >> $GITHUB_ENV
fi
- name: Setup node env
uses: actions/setup-node@v3
with:
Expand All @@ -31,16 +30,9 @@ jobs:
- name: Build files into dist
run: npm run build
working-directory: ./npm-package
- name: Check for changes in npm-package
id: changes
run: |
if git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.merge_commit_sha }} -- npm-package/ | grep -q .; then
echo "changes=true" >> $GITHUB_ENV
else
echo "changes=false" >> $GITHUB_ENV
fi
- name: Deploy
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm run semantic-release
if: steps.check_merge.outputs.is_merged == 'true' && steps.changes.outputs.changes == 'true'
working-directory: ./npm-package
if: steps.check_merge.outputs.is_merged == 'true'
2 changes: 1 addition & 1 deletion npm-package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"test": "jest",
"dev": "nodemon src/server.ts",
"build": "tsc",
"semantic-release": "semantic-release --branches main",
"semantic-release": "semantic-release",
"commit": "git-cz"
},
"repository": {
Expand Down

0 comments on commit 2b31811

Please sign in to comment.