-
-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (46 loc) · 1.53 KB
/
intellij-publish.yml
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 Plugin to Jetbrains
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
- name: Write Gradle Properties File
uses: joutvhu/write-file@v1
with:
path: gradle.properties
contents: ${{ secrets.GRADLE_IDEA_PROPERTIES }}
write_mode: overwrite
- name: Get Current Release
id: current_release
uses: joutvhu/get-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build with Gradle
run: gradle clean buildPlugin
- name: Publish Plugin to Jetbrains
if: ${{ steps.current_release.outputs.draft == 'false' }}
run: gradle publishPlugin
- name: Get Plugin File
id: get_file
run: echo ::set-output name=plugin_file::$(find dart-scripts-*.zip)
working-directory: ./build/distributions
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.current_release.outputs.upload_url }}
asset_name: ${{ steps.get_file.outputs.plugin_file }}
asset_path: ./build/distributions/${{ steps.get_file.outputs.plugin_file }}
asset_content_type: application/zip