From 8a71663119b14a7db45268cba145f83267c05581 Mon Sep 17 00:00:00 2001 From: Lukasz Gornicki Date: Thu, 10 Dec 2020 11:58:49 +0100 Subject: [PATCH] ci: add workflow that bumps parser in other asyncapi repos (#208) --- .github/workflows/bump.yml | 29 +++++++++++++++++++++++++++++ package.json | 1 + 2 files changed, 30 insertions(+) create mode 100644 .github/workflows/bump.yml diff --git a/.github/workflows/bump.yml b/.github/workflows/bump.yml new file mode 100644 index 000000000..459ea187e --- /dev/null +++ b/.github/workflows/bump.yml @@ -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: info@asyncapi.io + #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' \ No newline at end of file diff --git a/package.json b/package.json index be7c1ed1d..76bc7793d 100644 --- a/package.json +++ b/package.json @@ -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",