Skip to content

2.2.0.10

2.2.0.10 #717

Workflow file for this run

name: Release Dispatcher
on:
release:
types:
- created
jobs:
dispatch:
name: Dispatch
env:
PACKAGES_TO_UPGRADE: ${{ needs.run_publish.outputs.packages }}
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Determine release version
id: version
run: echo ::set-output name=VERSION::${{ github.event.release.tag_name }}
- name: Dispatch to moddio/gs
run: |
curl -H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${{ secrets.MODDIO2_DISPATCH_TOKEN }}" \
--request POST \
--data '{"event_type": "moddio2_post_release", "client_payload": { "version": "${{ steps.version.outputs.VERSION }}", "gsBranch": "master", "editorBranch": "master", "regenerateApiFrom": "" }}' https://api.github.com/repos/moddio/gs/dispatches
- name: Dispatch to moddio/be
run: |
if [[ "${{ steps.version.outputs.VERSION }}" == *"-staging" ]]; then
curl -H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${{ secrets.MODDIO2_DISPATCH_TOKEN }}" \
--request POST \
--data '{"event_type": "moddio2_staging_post_release", "client_payload": { "version": "${{ steps.version.outputs.VERSION }}", "gsBranch": "master", "editorBranch": "master", "regenerateApiFrom": "" }}' https://api.github.com/repos/moddio/be/dispatches
else
curl -H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${{ secrets.MODDIO2_DISPATCH_TOKEN }}" \
--request POST \
--data '{"event_type": "moddio2_post_release", "client_payload": { "version": "${{ steps.version.outputs.VERSION }}", "gsBranch": "master", "editorBranch": "master", "regenerateApiFrom": "" }}' https://api.github.com/repos/moddio/be/dispatches
fi