-
Notifications
You must be signed in to change notification settings - Fork 37
93 lines (76 loc) Β· 2.57 KB
/
Copy pathbuild.yml
File metadata and controls
93 lines (76 loc) Β· 2.57 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Dracula Theme CI
on:
push:
branches:
- master
- 'release/**'
tags:
- 'v*'
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: '21'
distribution: 'temurin'
# Held at v5, the last major under the MIT licence. v6 moves caching into the
# proprietary gradle-actions-caching component, and using it means accepting
# Gradle's commercial Terms of Use β a licensing call for this MIT project, not
# something to pick up in passing while clearing a deprecation warning.
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build plugin
run: ./gradlew buildPlugin
# Downloads the target IDEs, so this is the slow step. It is also the only automated
# check this repo has β without it a compatibility break reaches the Marketplace.
- name: Verify plugin
run: ./gradlew verifyPlugin
- name: Upload build artifacts
uses: actions/upload-artifact@v7
with:
name: plugin-artifact
path: build/distributions/*.zip
retention-days: 7
release:
needs: build
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: '21'
distribution: 'temurin'
# Held at v5 for the licence reason noted in the build job.
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
- name: Grant execute permission for gradlew
run: chmod +x gradlew
# Build once, then ship that same zip to both destinations. Publishing separately from
# the artifact attached to the release would put two distinct builds behind one tag.
- name: Build plugin
run: ./gradlew buildPlugin
- name: Create GitHub Release
uses: softprops/action-gh-release@v3
with:
files: build/distributions/*.zip
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to JetBrains Marketplace
env:
JETBRAINS_TOKEN: ${{ secrets.JETBRAINS_TOKEN }}
run: ./gradlew publishPlugin