Build 110 - version-patch #108
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: On Pipedrive Bot PR opened | |
on: | |
pull_request_target: | |
types: [labeled] | |
branches: | |
- master | |
jobs: | |
on_pr_opened: | |
if: | | |
github.actor == 'pipedrive-bot' && | |
!contains(github.event.pull_request.labels.*.name, 'npm-ready-for-publish') && ( | |
contains(github.event.pull_request.labels.*.name, 'npm-version-patch') || | |
contains(github.event.pull_request.labels.*.name, 'npm-version-minor') || | |
contains(github.event.pull_request.labels.*.name, 'npm-version-major') | |
) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout ${{ github.repository }} current branch "${{ github.head_ref }}" | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.head_ref }} | |
persist-credentials: false | |
- name: Read .nvmrc | |
run: echo ::set-output name=NVMRC::$(cat .nvmrc) | |
id: nvm | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '${{ steps.nvm.outputs.NVMRC }}' | |
- uses: actions/cache@v3 | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
- run: npm install | |
- run: npx changelog-updater --check | |
- name: Approve PR and add publish label | |
shell: bash | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh pr review ${{ github.event.number }} --approve --body "Approved by automation" | |
gh pr edit ${{ github.event.number }} --add-label "npm-ready-for-publish" |