-
Notifications
You must be signed in to change notification settings - Fork 63
126 lines (110 loc) · 3.64 KB
/
ide_plugins.yml
File metadata and controls
126 lines (110 loc) · 3.64 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
name: IDE Plugins
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
check-paths:
runs-on: ubuntu-latest
outputs:
any_changed: ${{ steps.changed-files.outputs.any_changed }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45
with:
files: |
packages/jetbrains/**
packages/vim/**
packages/emacs/**
.github/workflows/ide_plugins.yml
jetbrains:
needs: check-paths
if: needs.check-paths.outputs.any_changed == 'true'
name: JetBrains Plugin
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: 8.5
- name: Check Kotlin formatting
run: ./scripts/format_kotlin_files --check
- name: Build Plugin
working-directory: packages/jetbrains
run: gradle buildPlugin
- name: Verify Plugin
working-directory: packages/jetbrains
run: gradle verifyPlugin
- name: Publish Plugin
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && contains(github.event.head_commit.modified, 'packages/jetbrains/src/main/resources/META-INF/plugin.xml')
working-directory: packages/jetbrains
run: gradle publishPlugin
env:
PUBLISH_TOKEN: ${{ secrets.JETBRAINS_TOKEN }}
vim:
needs: check-paths
if: needs.check-paths.outputs.any_changed == 'true'
name: Vim/Neovim
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Check Lua formatting
run: ./scripts/format_lua_files --check
emacs:
needs: check-paths
if: needs.check-paths.outputs.any_changed == 'true'
name: Emacs Mode
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup Emacs
uses: purcell/setup-emacs@master
with:
version: 29.1
- name: Byte compile
working-directory: packages/emacs
run: emacs -Q -batch -L . -f batch-byte-compile dotprompt-mode.el
ide-plugins-all:
if: always()
needs: [jetbrains, vim, emacs]
runs-on: ubuntu-latest
steps:
- name: Check overall status
run: |
if [[ "${NEEDS_JETBRAINS_RESULT}" == "failure" || "${NEEDS_VIM_RESULT}" == "failure" || "${NEEDS_EMACS_RESULT}" == "failure" ]]; then
echo "IDE plugins checks failed"
exit 1
fi
echo "IDE plugins checks passed or were skipped"
exit 0
env:
NEEDS_JETBRAINS_RESULT: ${{ needs.jetbrains.result }}
NEEDS_VIM_RESULT: ${{ needs.vim.result }}
NEEDS_EMACS_RESULT: ${{ needs.emacs.result }}