forked from MarathonLabs/marathon
-
Notifications
You must be signed in to change notification settings - Fork 4
107 lines (106 loc) · 3.82 KB
/
ci.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
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
name: ci
on: [ push, pull_request ]
jobs:
ci:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- name: test
run: |
chmod 0600 $GITHUB_WORKSPACE/vendor/vendor-ios/src/test/resources/fixtures/derived-data-manager/test_rsa
./gradlew clean test jacocoTestReport integrationTest
bash <(curl -s https://codecov.io/bash)
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: always()
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
- name: detekt
run: |
./gradlew clean detektCheck || true
- name: validateGradlePlugins
run: |
./gradlew validatePlugins
cd-snapshot:
runs-on: ubuntu-22.04
needs: ci
if: ${{ github.ref == 'refs/heads/develop' }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- name: deliver maven
run: |
bash .buildsystem/deploy-sonatype.sh
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
BUGSNAG_TOKEN: ${{ secrets.BUGSNAG_TOKEN }}
- name: deliver cli
run: |
./gradlew :cli:publishDistZipPublicationToGitHubRepository -PreleaseMode=SNAPSHOT
env:
GH_MAVEN_USERNAME: ${{ secrets.GH_MAVEN_USERNAME }}
GH_MAVEN_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
BUGSNAG_TOKEN: ${{ secrets.BUGSNAG_TOKEN }}
cd-release:
runs-on: ubuntu-22.04
needs: ci
if: ${{ startsWith(github.ref, 'refs/tags/') }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- uses: little-core-labs/[email protected]
if: ${{ startsWith(github.ref, 'refs/tags/') }}
- name: deliver maven
run: |
bash .buildsystem/deploy-sonatype.sh
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
BUGSNAG_TOKEN: ${{ secrets.BUGSNAG_TOKEN }}
- name: assemble cli
run: |
./gradlew :cli:assembleDist -PreleaseMode=RELEASE
rm -f cli/build/distributions/marathon-*-SNAPSHOT.zip || true
env:
BUGSNAG_TOKEN: ${{ secrets.BUGSNAG_TOKEN }}
- name: deliver cli
uses: softprops/action-gh-release@v1
with:
files: cli/build/distributions/marathon-*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: deliver gradle plugin
run: ./gradlew :marathon-gradle-plugin:publishPlugins -Pgradle.publish.key=$GRADLE_PUBLISH_KEY -Pgradle.publish.secret=$GRADLE_PUBLISH_SECRET
env:
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
notify:
needs: cd-release
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Send Telegram Release message
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: |
New Marathon version has been submitted to Maven central and will be available soon https://github.com/MarathonLabs/marathon/releases/