Skip to content

Commit

Permalink
Merge branch 'main' into chore/mql-specs
Browse files Browse the repository at this point in the history
  • Loading branch information
kmruiz authored Nov 28, 2024
2 parents 3f0ac52 + 9670ea2 commit 097e94b
Show file tree
Hide file tree
Showing 8 changed files with 225 additions and 96 deletions.
4 changes: 3 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -203,4 +203,6 @@ ij_yaml_keep_indents_on_empty_lines = false
ij_yaml_keep_line_breaks = true
ij_yaml_space_before_colon = false
ij_yaml_spaces_within_braces = true
ij_yaml_spaces_within_brackets = true
ij_yaml_spaces_within_brackets = true
tab_width = 2
indent_size = 2
30 changes: 17 additions & 13 deletions .github/workflows/draft-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ on:
workflow_dispatch:
inputs:
versionBump:
description: 'Version bump'
description: "Version bump"
type: choice
required: true
default: 'patch'
default: "patch"
options:
- patch
- minor
Expand All @@ -26,16 +26,24 @@ jobs:
name: "Prepare Release"
runs-on: ubuntu-latest
steps:
- uses: mongodb-js/devtools-shared/actions/setup-bot-token@main
id: app-token
with:
app-id: ${{ vars.DEVTOOLS_BOT_APP_ID }}
private-key: ${{ secrets.DEVTOOLS_BOT_PRIVATE_KEY }}

- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
distribution: "temurin"
java-version: "17"
cache: "gradle"

- name: Determine Next Version
shell: bash
env:
Expand Down Expand Up @@ -97,28 +105,24 @@ jobs:
- name: Create Draft Release
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.SVC_DEVTOOLSBOT_TOKEN }}
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
set -e
echo Creating draft release for: "${RELEASE_TAG}"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .
git commit --no-verify -m "Release ${RELEASE_TAG}"
git tag ${RELEASE_TAG}
git push origin ${RELEASE_TAG}
GIT_REF=$(git rev-parse ${RELEASE_TAG})
ls packages/jetbrains-plugin/build/distributions/jetbrains-plugin.zip
CHANGELOG=$(./gradlew --quiet --console=plain :packages:jetbrains-plugin:getChangelog)
gh release create "${RELEASE_TAG}" \
--title "${RELEASE_TAG}" \
--notes "${CHANGELOG}" \
--target "${GIT_REF}" \
--draft \
packages/jetbrains-plugin/build/distributions/jetbrains-plugin.zip
30 changes: 19 additions & 11 deletions .github/workflows/publish-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,53 @@ name: Publish Release

on:
release:
types: [ published ]
types: [published]

jobs:
prepare-release:
name: "Prepare Release"
runs-on: ubuntu-latest
steps:
- uses: mongodb-js/devtools-shared/actions/setup-bot-token@main
id: app-token
with:
app-id: ${{ vars.DEVTOOLS_BOT_APP_ID }}
private-key: ${{ secrets.DEVTOOLS_BOT_PRIVATE_KEY }}

- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
fetch-depth: 0
token: ${{ steps.app-token.outputs.token }}

- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
distribution: "temurin"
java-version: "17"
cache: "gradle"

- uses: robinraju/release-downloader@v1.10
- uses: robinraju/release-downloader@a96f54c1b5f5e09e47d9504526e96febd949d4c2 # 1.11
with:
tag: ${{ github.ref_name }}
fileName: 'jetbrains-plugin.zip'
out-file-path: 'packages/jetbrains-plugin/build/distributions/'
fileName: "jetbrains-plugin.zip"
out-file-path: "packages/jetbrains-plugin/build/distributions/"

- name: Publish Plugin In General Availability
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.SVC_DEVTOOLSBOT_TOKEN }}
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
JB_PUBLISH_CHANNEL: "ga"
JB_PUBLISH_TOKEN: ${{ secrets.JB_PUBLISH_TOKEN }}
JB_CERTIFICATE_CHAIN: ${{ secrets.JB_CERTIFICATE_CHAIN }}
JB_PRIVATE_KEY: ${{ secrets.JB_PRIVATE_KEY }}
JB_PRIVATE_KEY_PASSWORD: ${{ secrets.JB_PRIVATE_KEY_PASSWORD }}
run: |
set -e
./gradlew ":packages:jetbrains-plugin:publishPlugin" $(./gradlew ":packages:jetbrains-plugin:publishPlugin" --dry-run | awk '/^:/ { print "-x" $1 }' | sed '$ d')
git checkout main
git merge ${{ github.ref_name }}
git push origin main
Loading

0 comments on commit 097e94b

Please sign in to comment.