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

feat(gateway): json interface for dapi #2087

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
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
62 changes: 59 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concurrency:
jobs:
release-npm:
name: Release NPM packages
runs-on: [ "self-hosted", "linux", "arm64", "ubuntu-platform" ]
runs-on: ["self-hosted", "linux", "arm64", "ubuntu-platform"]
timeout-minutes: 15
if: github.event_name != 'workflow_dispatch'
steps:
Expand Down Expand Up @@ -167,10 +167,61 @@ jobs:
image_name: dashmate-helper
target: dashmate-helper

release-proto-descriptor:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need this? Just include dapi-grpc package in dashmate

name: Release Proto Descriptor for Gateway JSON mapping
runs-on: ubuntu-22.04
steps:
- name: Check out Platform repo
uses: actions/checkout@v4
with:
path: platform
sparse-checkout: "packages/dapi-grpc/protos"

- name: Check out Google APIs repo
uses: actions/checkout@v4
with:
repository: googleapis/googleapis
path: googleapis

- name: Install protoc
id: deps-protoc
shell: bash
run: |
curl -Lo /tmp/protoc.zip \
"https://github.com/protocolbuffers/protobuf/releases/download/v27.3/protoc-27.3-linux-x86_64.zip"
unzip -o /tmp/protoc.zip -d ${HOME}/.local
echo "PROTOC=${HOME}/.local/bin/protoc" >> $GITHUB_ENV
export PATH="${PATH}:${HOME}/.local/bin"

- name: Generate Core proto descriptor
run: |
mkdir -p pb && \
protoc \
-Igoogleapis -Iplatform/packages/dapi-grpc/protos --include_imports --include_source_info \
--descriptor_set_out=pb/core.pb \
platform/packages/dapi-grpc/protos/core/v0/core.proto

- name: Generate Platform proto descriptor
run: |
mkdir -p pb && \
protoc \
-Igoogleapis -Iplatform/packages/dapi-grpc/protos --include_imports --include_source_info \
--descriptor_set_out=pb/platform.pb \
platform/packages/dapi-grpc/protos/platform/v0/platform.proto

- name: Upload proto descriptor
uses: actions/upload-artifact@v4
with:
name: proto-descriptors
path: pb/*.pb
if-no-files-found: error

release-dashmate-packages:
name: Release Dashmate packages
runs-on: ${{ matrix.os }}
needs: release-npm
needs:
- release-npm
- release-proto-descriptor
permissions:
id-token: write # s3 cache
contents: write # update release artifacts
Expand All @@ -190,7 +241,7 @@ jobs:
- name: Check out repo
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-depth: 0

- name: Configure AWS credentials and bucket region
uses: aws-actions/configure-aws-credentials@v4
Expand All @@ -199,6 +250,11 @@ jobs:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Retrieve proto descriptors
uses: actions/download-artifact@v4
with:
name: proto-descriptors

- name: Retrieve JS build artifacts
uses: strophy/actions-cache@opendal-update
with:
Expand Down
Loading