Bump gitstream-core
to 2.1.49
#54
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
# install new gitstream-core version and open PR with new changes | |
name: Bump gitstream-core | |
run-name: Bump `gitstream-core` to `${{ inputs.version }}` | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: Version number (ex. "2.1.20") | |
required: true | |
default: 2.1.20 | |
ticket: | |
description: LINBEE-XXXX ticket number | |
default: LINBEE-8514 | |
required: false | |
description: | |
description: Add a description for this version | |
required: false | |
jobs: | |
publish_pr: | |
name: Publish PR | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set version to ENV | |
run: | | |
echo "VERSION=${{ inputs.version }}" >> "$GITHUB_ENV" | |
echo "BRANCH_NAME=${{ inputs.ticket }}-bump-gitstream-core-to-${{ inputs.version }}" >> "$GITHUB_ENV" | |
- name: Init npmrc | |
run: | | |
curl -H "X-JFrog-Art-API: ${{ secrets.ARTIFACTORY_API_KEY }}" https://linearb.jfrog.io/linearb/api/npm/npm-local/auth/linearb >> .npmrc | |
- name: Install @linearb/gitstream-core@${{ env.VERSION }} | |
run: npm install --save --save-exact @linearb/gitstream-core@${{ env.VERSION }} | |
- name: Run Format & Lint & Test & Build & Package | |
run: npm run all | |
- name: Create PR for ${{ env.VERSION }} | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
echo -e "Bump \`@linearb/gitstream-core\` to \`${{ env.VERSION }}\`\n\n${{ inputs.description }}" > pr_description.txt | |
git config --global user.name 'GitHub Actions Bot' | |
git config --global user.email 'actions@github.com' | |
git add package.json package-lock.json dist/index.js | |
git commit -m "bump `@linearb/gitstream-core` to `${{ env.VERSION }}`" -m "${{ inputs.description }}" | |
git push origin HEAD:${{ env.BRANCH_NAME }} | |
gh pr create \ | |
--base develop \ | |
--title "Bump \`@linearb/gitstream-core\` to \`${{ env.VERSION }}\`" \ | |
--body-file pr_description.txt \ | |
--head ${{ env.BRANCH_NAME }} \ | |
--reviewer ${{ github.actor }} |