update-cli #5
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: update-cli | |
on: | |
repository_dispatch: | |
types: [update-cli] | |
workflow_dispatch: | |
inputs: | |
target_version: | |
description: 'Version of the CLI to update to' | |
required: true | |
type: string | |
jobs: | |
update-cli: | |
runs-on: ubuntu-latest | |
env: | |
RAW_VERSION: ${{ github.event_name == 'repository_dispatch' && github.event.client_payload.cli_version || inputs.cli_version }} | |
BUNDLE_GITHUB__COM: ${{ secrets.BUNDLE_ACCESS_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
ref: next | |
- name: Configure Git | |
run: | | |
git config --global user.name "Bumpsnag Bot" | |
git config --global user.email "" | |
- name: Fetch full history | |
run: git fetch --prune --unshallow | |
- name: Remove leading 'v' | |
shell: bash | |
run: | | |
echo "CLI_VERSION=${RAW_VERSION#v}" >> $GITHUB_ENV | |
- name: Create update branch | |
run: | | |
git checkout -b cli-bump-${CLI_VERSION} next | |
- name: Update the CLI reference | |
run: | | |
echo "Bumping CLI to version $CLI_VERSION" | |
ls | |
./scripts/bump_cli.sh "$CLI_VERSION" | |
- name: Create bump commit | |
run: | | |
git add Bugsnag/Assets/Bugsnag/Editor/SymbolUpload/BugsnagCLI.cs | |
git commit -m "Update BugsnagCLI version number" | |
git push origin cli-bump-${CLI_VERSION} | |
- name: Create pull request | |
run: > | |
gh pr create -B next | |
-H bumpsnag-CLI-$CLI_VERSION | |
--title "Update CLI to version $CLI_VERSION" | |
--body 'Created by bumpsnag' | |
--reviewer rich-bugsnag | |
Bugsnag/Assets/Bugsnag/Editor/SymbolUpload/BugsnagCLI.cs |