From 56b25cccff2f5831db52188c1ea9f5b0f7a57be8 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Thu, 7 Sep 2023 16:22:14 -0400 Subject: [PATCH] Have the client updates auto-run in response to a published API release --- .github/workflows/release-client-update.yaml | 38 ++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/release-client-update.yaml diff --git a/.github/workflows/release-client-update.yaml b/.github/workflows/release-client-update.yaml new file mode 100644 index 0000000..1492544 --- /dev/null +++ b/.github/workflows/release-client-update.yaml @@ -0,0 +1,38 @@ +name: "Client updates for released API change" +on: + release: + types: ["published"] +jobs: + trigger: + runs-on: "ubuntu-latest" + name: "πŸ“¦ Release Client Updates" + if: "${{ contains(github.ref_name, 'v') }}" + steps: + - uses: "peter-evans/repository-dispatch@v2" + name: "πŸ•ΈοΈ Update authzed-node" + with: + token: "${{ secrets.EXTERNAL_REPO_TOKEN }}" + repository: "authzed/authzed-node" + event-type: "api_update" + client-payload: '{"BUFTAG": "${{ github.ref_name }}"}' + - uses: "peter-evans/repository-dispatch@v2" + name: "🐍 Update authzed-py" + with: + token: "${{ secrets.EXTERNAL_REPO_TOKEN }}" + repository: "authzed/authzed-py" + event-type: "api_update" + client-payload: '{"BUFTAG": "${{ github.ref_name }}"}' + - uses: "peter-evans/repository-dispatch@v2" + name: "πŸ’Ž Update authzed-rb" + with: + token: "${{ secrets.EXTERNAL_REPO_TOKEN }}" + repository: "authzed/authzed-rb" + event-type: "api_update" + client-payload: '{"BUFTAG": "${{ github.ref_name }}"}' + - uses: "peter-evans/repository-dispatch@v2" + name: "β˜• Update authzed-java" + with: + token: "${{ secrets.EXTERNAL_REPO_TOKEN }}" + repository: "authzed/authzed-java" + event-type: "api_update" + client-payload: '{"BUFTAG": "${{ github.ref_name }}"}'