Skip to content

update-cli

update-cli #8

Workflow file for this run

name: update-cli
on:
repository_dispatch:
types: [update-cli]
workflow_dispatch:
inputs:
cli_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: Debug
run: |
echo $RAW_VERSION
# - 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: 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"
# sed -i -E "s/private const string DOWNLOADED_CLI_VERSION = \".*\";/private const string DOWNLOADED_CLI_VERSION = \"$CLI_VERSION\";/g" Bugsnag/Assets/Bugsnag/Editor/SymbolUpload/BugsnagCLI.cs
# - 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