Skip to content

fix: fix build issues with plugin versions not compatible with java 21 #162

fix: fix build issues with plugin versions not compatible with java 21

fix: fix build issues with plugin versions not compatible with java 21 #162

name: CI - Publish Java and Python Artifacts for Pull Requests
env:
# enable gradle remote build cache
S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ secrets.SELF_RUNNER_AWS_ACCESS_KEY_ID }}
S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }}
on:
pull_request:
types:
- opened
- synchronize
paths:
- "protocol-models/**"
jobs:
pull-request-publish:
concurrency:
# only allow one workflow run at a time for a given SHA
# to prevent multiple runs from pushing artifacts for the same SHA at the same time
# note: using inputs in the group expression only works when specifying concurrency at the job level
group: ${{ github.workflow }}-${{ github.sha }}
cancel-in-progress: false
name: Publish Development Artifacts
runs-on: ubuntu-latest
steps:
- name: Checkout Airbyte Protocol
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "21"
- name: Generate Development Version
run: |
cat .env
CURRENT_VERSION=$(grep VERSION .env)
sed -i -e "s/$CURRENT_VERSION/$CURRENT_VERSION.dev$(date +%s)/g" .env
cat .env
# java
- name: Gradle Build
run: ./gradlew build --scan
- name: Publish Jar
env:
CLOUDREPO_USER: ${{ secrets.CLOUDREPO_USER }}
CLOUDREPO_PASSWORD: ${{ secrets.CLOUDREPO_PASSWORD }}
# will use the version in .env
run: ./gradlew publish
# python
- name: Generate Python Protocol Classes
run: protocol-models/bin/generate-python-pydantic-docker.sh
- name: Publish Python Package to test.pypi.org
uses: mariamrf/[email protected]
with:
# specify the same version as in ~/.python-version
python_version: "3.9.11"
pip_version: "21.1"
subdir: "protocol-models/python/airbyte_protocol"
env:
TWINE_PASSWORD: ${{ secrets.TEST_TWINE_PASSWORD }}
TWINE_USERNAME: ${{ secrets.TEST_TWINE_USERNAME }}
TWINE_REPOSITORY_URL: "https://test.pypi.org/legacy/"
# python - pydantic v2
- name: Generate Python Pydantic V2 Protocol Classes
run: protocol-models/bin/generate-python-pydantic-v2-docker.sh
- name: Publish Python Package to test.pypi.org
uses: mariamrf/[email protected]
with:
# specify the same version as in ~/.python-version
python_version: "3.9.11"
pip_version: "21.1"
subdir: "protocol-models/python/airbyte_protocol_pdv2"
env:
TWINE_PASSWORD: ${{ secrets.TEST_TWINE_PASSWORD }}
TWINE_USERNAME: ${{ secrets.TEST_TWINE_USERNAME }}
TWINE_REPOSITORY_URL: "https://test.pypi.org/legacy/"
# python - dataclasses
- name: Generate Python DataClasses Protocol Classes
run: protocol-models/bin/generate-python-dataclasses-docker.sh
- name: Publish Python Package to test.pypi.org
uses: mariamrf/[email protected]
with:
# specify the same version as in ~/.python-version
python_version: "3.9.11"
pip_version: "21.1"
subdir: "protocol-models/python/airbyte_protocol_dataclasses"
env:
TWINE_PASSWORD: ${{ secrets.TEST_TWINE_PASSWORD }}
TWINE_USERNAME: ${{ secrets.TEST_TWINE_USERNAME }}
TWINE_REPOSITORY_URL: "https://test.pypi.org/legacy/"
# node
- name: Generate Typescript Protocol Classes
run: protocol-models/bin/generate-typescript-classes-docker.sh
- name: Test npm publish
run: cd protocol-models/typescript && npm publish --dry-run