-
Notifications
You must be signed in to change notification settings - Fork 22
61 lines (55 loc) · 1.76 KB
/
build.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
58
59
60
61
# GitHub Action Workflow for building a new commit to the primary repo branch and publishing a new release to beta.
#
# Workflow is triggered on pushes. Beta publish job runs conditionally if pushed to master.
#
# Additional Docs:
# - GitHub Actions: https://help.github.com/en/actions
name: build-master
on:
push:
paths-ignore:
- '*.md'
jobs:
# Build and test plugin and provide artifact.
build:
name: Build
runs-on:
- codebuild-myProject-${{ github.run_id }}-${{ github.run_attempt }}
- image:arm-3.0
- instance-size:large
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '17'
- uses: gradle/actions/setup-gradle@v4
# Build artifact using buildPlugin Gradle task
- name: Build Plugin
run: ./gradlew build
# Build artifact using buildPlugin Gradle task
- name: Build Plugin
run: ./gradlew buildPlugin
# Run intellij:verifyPlugin task.
- name: Verify Plugin
run: ./gradlew verifyPlugin
publish-beta:
needs: build
runs-on:
- codebuild-myProject-${{ github.run_id }}-${{ github.run_attempt }}
- image:arm-3.0
- instance-size:large
if: github.repository == 'amazon-ion/ion-intellij-plugin' && github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '17'
- uses: gradle/actions/setup-gradle@v4
# Publish plugin to beta channel
- name: Publish Beta Plugin
env:
PUBLISH_TOKEN: ${{ secrets.JETBRAINS_TOKEN }}
PUBLISH_CHANNEL: beta
run: ./gradlew --stacktrace publishPlugin