-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (48 loc) · 1.72 KB
/
publish-release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Publish Release
on:
release:
types: [published]
permissions:
contents: read
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"
- uses: robinraju/release-downloader@a96f54c1b5f5e09e47d9504526e96febd949d4c2 # 1.11
with:
tag: ${{ github.ref_name }}
fileName: "jetbrains-plugin.zip"
out-file-path: "packages/jetbrains-plugin/build/distributions/"
- name: Publish Plugin In General Availability
shell: bash
env:
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