Skip to content

Commit

Permalink
ci: add workflow that bumps parser in other asyncapi repos (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
derberg authored Dec 10, 2020
1 parent edba6af commit 8a71663
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/bump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Bump package version in dependent repos

on:
release:
types:
- published

jobs:
bump:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Get version from package.json before release step
id: extractver
run: echo "::set-output name=version::$(npm run get-version --silent)"
- name: Get name of package from package.json
id: extractname
run: echo "::set-output name=packname::$(npm run get-name --silent)"
- name: Bumping latest version of this package in other repositories
uses: derberg/org-projects-dependency-manager@v1
with:
github_token: ${{ secrets.GH_TOKEN }}
committer_username: asyncapi-bot
committer_email: [email protected]
#This is commit message and PR title for repos where this package is in dependencies
commit_message_prod: 'fix: update ${{ steps.extractname.outputs.packname }} to ${{ steps.extractver.outputs.version }} version'
#This is commit message and PR title for repos where this package is in devDependencies
commit_message_dev: 'chore: update ${{ steps.extractname.outputs.packname }} to ${{ steps.extractver.outputs.version }} version'
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"prepublishOnly": "npm run bundle && npm run docs && npm run types",
"release": "semantic-release",
"get-version": "echo $npm_package_version",
"get-name": "echo $npm_package_name",
"lint": "eslint --max-warnings 0 --config .eslintrc .",
"gen-readme-toc": "markdown-toc -i README.md",
"test-lib": "nyc --reporter=html --reporter=text mocha --exclude test/browser_test.js --recursive",
Expand Down

0 comments on commit 8a71663

Please sign in to comment.