Skip to content

update-cli

update-cli #11

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: 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: Install ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: Install libcurl4-openssl-dev and net-tools
run: |
sudo apt-get update
sudo apt-get install libcurl4-openssl-dev net-tools
- name: Install dependencies
run: bundle install bumpsnag
# - 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 Changelog Entry
# - 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 cli-bump-${CLI_VERSION}
# --title "Update CLI to version $CLI_VERSION"
# --body 'Created by bumpsnag'
# --reviewer richardelms