Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add release trigger for downstream targets to update #1596

Merged
merged 2 commits into from
Nov 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/downstream_updates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: downstream-updates

on:
release:
types: [released]
workflow_dispatch:
inputs:
target_version:
description: 'Version of the submodule to update downstream repos to'
required: true
type: string

jobs:
update-dependencies:
runs-on: ubuntu-latest
env:
RELEASE_VERSION: ${{ github.event_name == 'workflow_dispatch' && inputs.target_version || github.event.release.tag_name }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strategy:
matrix:
downstream_repo: ['bugsnag/bugsnag-unity']
steps:
- name: Install libcurl4-openssl-dev and net-tools
run: |
sudo apt-get update
sudo apt-get install libcurl4-openssl-dev net-tools

- run: >
curl -X POST https://api.github.com/repos/${{ matrix.downstream_repo }}/dispatches
-H 'Content-Type: application/json'
-H "Authorization: Bearer $GITHUB_TOKEN"
-d '{"event_type":"update-dependency","client_payload": {"target_submodule":"bugsnag-cocoa", "target_version": "$RELEASE_VERSION"}}'
Loading