diff --git a/.github/workflows/notify-sdks.yml b/.github/workflows/notify-sdks.yml new file mode 100644 index 000000000..2450bd696 --- /dev/null +++ b/.github/workflows/notify-sdks.yml @@ -0,0 +1,54 @@ +# Copyright 2026 UCP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: SDK Release Notification + +on: + workflow_dispatch: + inputs: + version: + description: "Version to notify (e.g. v2026-03-07)" + required: true + default: "v2026-03-07" + push: + tags: + - "v[0-9]{4}-[0-9]{2}-[0-9]{2}" + +jobs: + notify-sdks: + runs-on: ubuntu-latest + steps: + - name: Generate Token + uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ secrets.APP_ID }} + private-key: ${{ secrets.APP_PRIVATE_KEY }} + owner: ${{ github.repository_owner }} + + - name: Notify Python SDK + uses: peter-evans/repository-dispatch@v3 + with: + token: ${{ steps.app-token.outputs.token }} + repository: Universal-Commerce-Protocol/python-sdk + event-type: spec-release + client-payload: "{\"version\": \"${{ github.event.inputs.version || github.ref_name }}\"}" + + - name: Notify JavaScript SDK + uses: peter-evans/repository-dispatch@v3 + with: + token: ${{ steps.app-token.outputs.token }} + repository: Universal-Commerce-Protocol/js-sdk + event-type: spec-release + client-payload: "{\"version\": \"${{ github.event.inputs.version || github.ref_name }}\"}"