-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automatically release on GitHub Release creation + bump lerna to 5.1.4 (
#535)
- Loading branch information
Showing
56 changed files
with
1,508 additions
and
1,831 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 |
---|---|---|
@@ -1,11 +1,8 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- '**.md' | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
publish-packages: | ||
|
@@ -20,61 +17,42 @@ jobs: | |
steps: | ||
- name: Check out | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Fetch tags for check below. | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 14 | ||
registry-url: https://registry.npmjs.org | ||
|
||
- name: Extract version | ||
id: extract-version | ||
- name: Extract tag version | ||
id: extract-tag-version | ||
run: | | ||
CDK_VERSION="$(jq -r '.version' < lerna.json)" | ||
echo "CDK_VERSION=$CDK_VERSION" >> $GITHUB_ENV | ||
- name: Check tag exists | ||
uses: mukunku/[email protected] | ||
id: check-tag | ||
with: | ||
tag: v${{ env.CDK_VERSION }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
TAG="${GITHUB_REF:10}" | ||
TAG_VERSION="${TAG//v/}" | ||
echo "TAG_VERSION=$TAG_VERSION" >> $GITHUB_ENV | ||
- name: Install dependencies | ||
if: steps.check-tag.outputs.exists == 'false' | ||
run: npm install -g npm@7 lerna && lerna bootstrap --hoist | ||
|
||
- name: Publish CDK package | ||
if: steps.check-tag.outputs.exists == 'false' | ||
- name: Publish Airbyte CDK package | ||
run: | | ||
cd faros-airbyte-cdk && \ | ||
npm i && \ | ||
npm version ${{ env.TAG_VERSION }} && \ | ||
npm publish --access public --tag latest | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Publish Faros Destination package | ||
if: steps.check-tag.outputs.exists == 'false' | ||
run: | | ||
cd destinations/airbyte-faros-destination && \ | ||
cat package.json | jq --arg V "${{ env.TAG_VERSION }}" '.dependencies."faros-airbyte-cdk" = $V' > package.json && \ | ||
npm i && \ | ||
npm version ${{ env.TAG_VERSION }} && \ | ||
npm publish --access public --tag latest | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Create tag | ||
if: steps.check-tag.outputs.exists == 'false' | ||
uses: pkgdeps/[email protected] | ||
with: | ||
git_commit_sha: ${{ github.sha }} | ||
git_tag_prefix: v | ||
github_repo: ${{ github.repository }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
version: ${{ env.CDK_VERSION }} | ||
|
||
publish-connectors: | ||
name: Publish connectors | ||
runs-on: ubuntu-latest | ||
|
@@ -83,6 +61,13 @@ jobs: | |
- name: Check out | ||
uses: actions/checkout@v3 | ||
|
||
- name: Extract tag version | ||
id: extract-tag-version | ||
run: | | ||
TAG="${GITHUB_REF:10}" | ||
TAG_VERSION="${TAG//v/}" | ||
echo "TAG_VERSION=$TAG_VERSION" >> $GITHUB_ENV | ||
- name: Docker login | ||
uses: docker/[email protected] | ||
with: | ||
|
@@ -95,5 +80,5 @@ jobs: | |
run: | | ||
for connector_path in $(ls -d sources/*/ destinations/*/) | ||
do | ||
./scripts/publish-connector.sh $connector_path | ||
./scripts/publish-connector.sh $connector_path ${{ env.TAG_VERSION }} | ||
done |
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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"version": "0.1.99", | ||
"version": "0.0.1", | ||
"packages": [ | ||
"faros-airbyte-cdk", | ||
"destinations/**", | ||
|
Oops, something went wrong.