forked from hhariri/CleanCode
-
Notifications
You must be signed in to change notification settings - Fork 8
55 lines (45 loc) · 1.36 KB
/
main.yml
File metadata and controls
55 lines (45 loc) · 1.36 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
name: Build & Publish
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
cache: true
cache-dependency-path: src/dotnet/*/*.csproj
- name: Setup Gradle
uses: gradle/actions/setup-gradle@0b6dd653ba04f4f93bf581ec31e66cbd7dcb644d # v4
- name: Cache IntelliJ Platform
uses: actions/cache@v4
with:
path: .intellijPlatform
key: intellij-${{ hashFiles('gradle.properties') }}
- name: Build Plugin
if: github.ref != 'refs/heads/master'
run: ./gradlew buildPlugin --parallel --build-cache
- name: Build & Publish Plugin
if: github.ref == 'refs/heads/master'
shell: bash
run: ./gradlew publishPlugin -PBuildConfiguration="Release" -PPublishToken="$PUBLISH_KEY" --parallel --build-cache
env:
PUBLISH_KEY: ${{ secrets.PublishKey }}
- name: Publish Artifact
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: output
retention-days: 7