-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* [ISSUE #19981] testing version bump * [ISSUE #19981] debugging part-to-bump * [ISSUE #19981] further debugging on part-to-bump * [ISSUE #19981] further debugging on part-to-bump yet again * [ISSUE #19981] further debugging on part-to-bump yet again and again * [ISSUE #19981] improving on first successful attempt * [ISSUE #19981] adding changelog and concurrency * [ISSUE #19981] update version in .bumpversion.cfg * [ISSUE #19981] testing Slack notification with working channel * [ISSUE #19981] documentation and clean up before PR * [ISSUE #19981] make changelog-message optional * [ISSUE #19981] align version with new release * [ISSUE #19981] code review
- Loading branch information
Showing
6 changed files
with
120 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
name: Publish CDK Manually | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
repo: | ||
description: "Repo to check out code from. Defaults to the main airbyte repo. Set this when building connectors from forked repos." | ||
required: false | ||
default: "airbytehq/airbyte" | ||
gitref: | ||
description: "The git ref to check out from the specified repository." | ||
required: false | ||
default: master | ||
release-type: | ||
type: choice | ||
description: "Choose the type of version upgrade : major|minor|patch" | ||
options: | ||
- major | ||
- minor | ||
- patch | ||
- none | ||
required: true | ||
skip-publish-test: | ||
description: 'By default, the job publishes to Test PyPi. Use "true" to only publish to actual PyPi servers.' | ||
required: false | ||
changelog-message: | ||
description: "Changelog message to be added to CHANGELOG.md" | ||
required: false | ||
|
||
concurrency: | ||
group: publish-airbyte-cdk | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
bump-version: | ||
if: github.event.inputs.release-type != 'none' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.9" | ||
- name: Checkout Airbyte | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: ${{ github.event.inputs.repo }} | ||
ref: ${{ github.event.inputs.gitref }} | ||
- name: "Publish Airbyte CDK: bump version" | ||
run: | | ||
pip install bumpversion | ||
cd airbyte-cdk/python | ||
bumpversion ${{ github.event.inputs.release-type }} | ||
new_version="$(grep -i 'current_version = ' .bumpversion.cfg | sed -e 's/.* = //')" | ||
awk -v NEW_VERSION="$new_version" -v CHANGELOG_MESSAGE="${{ github.event.inputs.changelog-message }}" 'NR==3{print "## " NEW_VERSION "\n" CHANGELOG_MESSAGE "\n"}1' CHANGELOG.md > tmp && mv tmp CHANGELOG.md | ||
- name: Commit and Push Changes | ||
if: success() | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
file_pattern: airbyte-cdk/python/setup.py airbyte-cdk/python/.bumpversion.cfg airbyte-cdk/python/CHANGELOG.md | ||
commit_message: 🤖 Bump ${{ github.event.inputs.release-type }} version of Airbyte CDK | ||
commit_user_name: Octavia Squidington III | ||
commit_user_email: octavia-squidington-iii@users.noreply.github.com | ||
|
||
build-cdk: | ||
needs: bump-version | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.9" | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: "zulu" | ||
java-version: "17" | ||
- name: Checkout Airbyte | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: ${{ github.event.inputs.repo }} | ||
ref: ${{ github.event.inputs.gitref }} | ||
- name: Build CDK Package | ||
run: SUB_BUILD=CONNECTORS_BASE ./gradlew --no-daemon --no-build-cache :airbyte-cdk:python:build | ||
|
||
publish-cdk: | ||
needs: build-cdk | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Airbyte | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: ${{ github.event.inputs.repo }} | ||
ref: ${{ github.event.inputs.gitref }} | ||
- name: Publish Python Package to test.pypi.org | ||
if: github.event.inputs.skip-publish-test != 'true' | ||
uses: mariamrf/py-package-publish-action@v1.1.0 | ||
with: | ||
# specify the same version as in ~/.python-version | ||
python_version: "3.9.11" | ||
pip_version: "21.1" | ||
subdir: "airbyte-cdk/python/" | ||
env: | ||
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} | ||
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} | ||
TWINE_REPOSITORY_URL: "https://test.pypi.org/legacy/" | ||
- name: Publish Python Package | ||
uses: mariamrf/py-package-publish-action@v1.1.0 | ||
with: | ||
# specify the same version as in ~/.python-version | ||
python_version: "3.9.11" | ||
pip_version: "21.1" | ||
subdir: "airbyte-cdk/python/" | ||
env: | ||
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} | ||
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[bumpversion] | ||
current_version = 0.18.1 | ||
commit = False | ||
|
||
[bumpversion:file:setup.py] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters