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: add Kotlin Android and JVM protos #245

Merged
merged 3 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
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
51 changes: 18 additions & 33 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,45 +98,30 @@ jobs:

build_kotlin:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Get current time
uses: gerred/actions/current-time@master
id: current-time

- name: Assume Role
uses: aws-actions/configure-aws-credentials@v1
with:
# TODO User: arn:aws:iam::***:user/shared-control-plane-deploy-user is not authorized to perform: sts:TagSession on resource: arn:aws:iam::***:role/control-plane-remote-deployer
role-skip-session-tagging: true
aws-access-key-id: ${{ secrets.PROD_CICD_DEPLOY_USER_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.PROD_CICD_DEPLOY_USER_SECRET_ACCESS_KEY }}
aws-region: us-west-2
role-to-assume: arn:aws:iam::401011790710:role/control-plane-remote-deployer
role-session-name: cicd-deployer
role-duration-seconds: 900

- name: Get CodeArtifact token
run: |
TOKEN=$(aws codeartifact get-authorization-token \
--domain momento-prod --domain-owner 401011790710 \
--query authorizationToken --output text)
echo "::add-mask::$TOKEN"
echo "CODEARTIFACT_AUTH_TOKEN=$TOKEN" >> $GITHUB_ENV
- name: Set up JDK 11
uses: actions/setup-java@v1
- name: Checkout project
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 11
java-version: 17
distribution: 'corretto'

- name: Install protoc
run: ./install_protoc.sh

- name: Cache Gradle packages
uses: actions/cache@v1
- name: Build package
uses: gradle/gradle-build-action@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
build-root-directory: ./kotlin
arguments: clean build

- name: Build
run: |
pushd kotlin-messages
./gradlew build
popd

build_python:
runs-on: ubuntu-latest
Expand Down
49 changes: 16 additions & 33 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,43 +159,26 @@ jobs:

publish_kotlin:
runs-on: ubuntu-latest
needs: release
needs: [ release, changes ]
# Temporarily disable this while debugging conditional release action
#if: ${{ needs.changes.outputs.protos == 'true' || needs.changes.outputs.java == 'true' }}

steps:
- name: Assume Role
uses: aws-actions/configure-aws-credentials@v1
with:
# TODO User: arn:aws:iam::***:user/shared-control-plane-deploy-user is not authorized to perform: sts:TagSession on resource: arn:aws:iam::***:role/control-plane-remote-deployer
role-skip-session-tagging: true
aws-access-key-id: ${{ secrets.PROD_CICD_DEPLOY_USER_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.PROD_CICD_DEPLOY_USER_SECRET_ACCESS_KEY }}
aws-region: us-west-2
role-to-assume: arn:aws:iam::401011790710:role/control-plane-remote-deployer
role-session-name: cicd-deployer
role-duration-seconds: 900

- name: Get CodeArtifact token
run: |
TOKEN=$(aws codeartifact get-authorization-token \
--domain momento-prod --domain-owner 401011790710 \
--query authorizationToken --output text)
echo "::add-mask::$TOKEN"
echo "CODEARTIFACT_AUTH_TOKEN=$TOKEN" >> $GITHUB_ENV
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Publish to CodeArtifact
run: |
VERSION="${{needs.release.outputs.version}}"
echo "version: ${VERSION}"
pushd kotlin-messages
./gradlew publish -Pversion=$VERSION
popd
- name: Publish to sonatype
env:
SONATYPE_SIGNING_KEY: ${{ secrets.SONATYPE_SIGNING_KEY }}
SONATYPE_SIGNING_KEY_PASSWORD: ${{ secrets.SONATYPE_SIGNING_KEY_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
KOTLIN_PROTOS_VERSION: ${{ needs.release.outputs.version }}
uses: gradle/gradle-build-action@v2
with:
build-root-directory: ./kotlin
gradle-version: wrapper
arguments: publishToSonatype closeSonatypeStagingRepository

publish_python:
# The type of runner that the job will run on
Expand Down
25 changes: 0 additions & 25 deletions kotlin-messages/buildSrc/build.gradle.kts

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file removed kotlin-messages/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
Loading
Loading