Skip to content
Closed
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
78 changes: 78 additions & 0 deletions .github/workflows/release-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Release PR

on:
workflow_dispatch:
inputs:
version:
description: "Release version"
required: true
default: 0.0.0
type: string

workflow_call:
inputs:
version:
default: 0.0.0
type: string
push:
branch: [main]

jobs:
release-pr:
runs-on: "macos-latest"
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Check Version
run: bash -c '$([[ "${{ inputs.version }}" =~ ^([0-9]+\.){2}[0-9]+ ]])'

- run: |
git config --global user.name "github"
git config --global user.email "noreply@github.com"

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "yarn"

- run: yarn install --immutable

- name: Changelog
id: create-changelog
run: |
TMPFILE=/tmp/tmpfile
bash scripts/generate_changelog.sh $TMPFILE
cat $TMPFILE >> $GITHUB_STEP_SUMMARY
cat $TMPFILE >> CHANGELOG.md
echo "changelog_file=$TMPFILE" >> $GITHUB_OUTPUT

- name: Bump version
run: yarn workspaces foreach version ${{ inputs.version }}
if: ${{ inputs.version }} != "0.0.0"

- name: Create Branch
id: create-branch
run: |
COMMIT_SHA=$(git rev-parse --short HEAD)
BRANCH=releases/draft-$COMMIT_SHA-$(date +%s)
git checkout -b $BRANCH
git add -A
git status
git commit -m "Changelog & version bump to ${{ inputs.version }}"
git push origin HEAD
echo "branch_name=$BRANCH" >> $GITHUB_OUTPUT
if: ${{ inputs.version }} != "0.0.0"

- name: Create PR
run: |
gh pr create -B main -H ${{ steps.create-branch.outputs.branch_name }} --title "Release:${{ inputs.version }}" --body-file ${{ steps.create-changelog.outputs.changelog_file }}
rm ${{ steps.create-changelog.outputs.changelog_file }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ inputs.version }} != "0.0.0"
14 changes: 14 additions & 0 deletions .github/workflows/test-release-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: TestRelease PR

on:
pull_request:
branch: [main]
push:
branch: [main]

jobs:
test-release-pr:
name: Test Release PR
uses: ./.github/workflows/release-pr.yml
with:
version: 0.0.1
550 changes: 550 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-version.cjs

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions .yarn/versions/1c2242bd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
undecided:
- "@databricks/databricks-vscode"
- "@databricks/databricks-sdk"
- databricks-vscode
2 changes: 2 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ plugins:
spec: "@yarnpkg/plugin-workspace-tools"
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
spec: "@yarnpkg/plugin-version"

yarnPath: .yarn/releases/yarn-3.2.1.cjs
238 changes: 238 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
"test:integ": "yarn workspaces foreach run test:integ",
"build": "yarn workspaces foreach run build",
"clean": "yarn workspaces foreach run clean",
"fix": "yarn workspaces foreach run fix"
"lint:fix:all": "yarn workspaces foreach run fix",
"lint:fix": "prettier --write",
"conentional-changelog": "conventional-changelog"
},
"repository": {
"type": "git",
Expand All @@ -30,11 +32,15 @@
"homepage": "https://github.com/databricks/databricks-vscode#readme",
"packageManager": "yarn@3.2.1",
"devDependencies": {
"@types/conventional-changelog": "^3.1.1",
"@typescript-eslint/eslint-plugin": "^5.42.0",
"@typescript-eslint/parser": "^5.42.0",
"conventional-changelog": "^3.1.25",
"conventional-changelog-cli": "^2.2.2",
"eslint": "^8.26.0",
"eslint-config-prettier": "^8.5.0",
"prettier": "^2.7.1",
"ts-mockito": "^2.6.1",
"typescript": "^4.8.4"
}
}
}
2 changes: 1 addition & 1 deletion packages/databricks-sdk-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@
],
"report-dir": "coverage"
}
}
}
52 changes: 26 additions & 26 deletions packages/databricks-vscode-types/package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
{
"name": "@databricks/databricks-vscode-types",
"version": "1.0.0",
"description": "Package with types and interfaces to develop extensions to the Databricks VSCode plugin",
"main": "index.js",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "git+https://github.com/databricks/databricks-vscode.git"
},
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/databricks/databricks-vscode/issues"
},
"homepage": "https://github.com/databricks/databricks-vscode#readme",
"scripts": {
"build": "tsc",
"watch": "tsc -w"
},
"devDependencies": {
"@types/vscode": "^1.73.0",
"typescript": "^4.8.4"
},
"dependencies": {
"@databricks/databricks-sdk": "workspace:^"
}
}
"name": "@databricks/databricks-vscode-types",
"version": "0.0.1",
"description": "Package with types and interfaces to develop extensions to the Databricks VSCode plugin",
"main": "index.js",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "git+https://github.com/databricks/databricks-vscode.git"
},
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/databricks/databricks-vscode/issues"
},
"homepage": "https://github.com/databricks/databricks-vscode#readme",
"scripts": {
"build": "tsc",
"watch": "tsc -w"
},
"devDependencies": {
"@types/vscode": "^1.73.0",
"typescript": "^4.8.4"
},
"dependencies": {
"@databricks/databricks-sdk": "workspace:^"
}
}
2 changes: 1 addition & 1 deletion packages/databricks-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -561,4 +561,4 @@
],
"report-dir": "coverage"
}
}
}
12 changes: 12 additions & 0 deletions scripts/generate_changelog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
for PACKAGE in "packages/databricks-vscode" "packages/databricks-sdk" "packages/databricks-vscode-types" "."; do
echo "## $PACKAGE" >> $1

TAG=$(git describe --abbrev=0 --match "release-v*")
if [ $? -ne 0 ]; then
echo "No release tag matching pattern 'release-v*' found. Generating changelog from beggining"
yarn conventional-changelog -k $PACKAGE --commit-path $PACKAGE >> $1
else
echo "Release tag found. Generating changelog from $TAG"
yarn conventional-changelog --tag-prefix="release-v" -k $PACKAGE --commit-path $PACKAGE >> $1
fi
done
Empty file added test.txt
Empty file.
Loading