Bump gitstream-core to 2.1.212
#211
This file contains hidden or 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.207") | |
| required: true | |
| default: 2.1.207 | |
| ticket: | |
| description: LINBEE-XXXXX ticket number | |
| default: LINBEE-8514 | |
| required: false | |
| description: | |
| description: Add a description for this version | |
| required: false | |
| auto-deploy: | |
| description: Add label "auto-deploy" to PR | |
| required: false | |
| type: boolean | |
| default: true | |
| reviewer: | |
| description: GitHub username to assign as reviewer | |
| required: false | |
| jobs: | |
| publish_pr: | |
| name: Publish PR | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - 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" | |
| echo "LABEL_ARG=" >> "$GITHUB_ENV" | |
| echo "REVIEWER_ARG=" >> "$GITHUB_ENV" | |
| - name: Set auto-deploy label | |
| if: inputs.auto-deploy | |
| run: | | |
| echo "LABEL_ARG=--label auto-deploy" >> "$GITHUB_ENV" | |
| - name: Set reviewer | |
| if: inputs.reviewer | |
| run: | | |
| echo "REVIEWER_ARG=--reviewer ${{ inputs.reviewer }}" >> "$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 "${{ 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 }}" | |
| 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 }} ${{ env.REVIEWER_ARG }} ${{ env.LABEL_ARG }} |