-
-
Notifications
You must be signed in to change notification settings - Fork 30
135 lines (124 loc) · 4.13 KB
/
release.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
name: Release Context Mapper
on:
push:
tags:
- 'v*'
jobs:
build_standalone:
name: Build Standalone Libraries (DSL, LSP)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Install Graphviz
run: sudo apt-get -y install graphviz
- name: Gradle caches
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew clean build
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
build_eclipse:
name: Build Eclipse Plugin
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Install Graphviz
run: sudo apt-get -y install graphviz
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Grant execute permission for mvnw
run: chmod +x mvnw
- name: Build with Maven
run: ./mvnw clean verify
publish_standalone_lib:
name: Publish Libraries to Maven Central (DSL Standalone Lib, LSP)
runs-on: ubuntu-latest
needs:
- build_eclipse
- build_standalone
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Install Graphviz
run: sudo apt-get -y install graphviz
- name: Gradle caches
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Configure GPG Key
run: |
mkdir -p ~/.gnupg/
printf "$GPG_SIGNING_KEY" | base64 --decode > ~/.gnupg/private.key
gpg --import --batch ~/.gnupg/private.key
env:
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Publish standalone library
run: ./gradlew clean publish -Psigning.keyId=${GPG_KEY_ID} -Psigning.password=${GPG_KEY_PASSPHRASE} -Psigning.secretKeyRingFile=/home/runner/.gnupg/private.key
env:
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
GPG_KEY_PASSPHRASE: ${{ secrets.GPG_KEY_PASSPHRASE }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
publish_eclipse:
name: Publish Eclipse Plugin (P2 repo)
runs-on: ubuntu-latest
needs:
- build_eclipse
- build_standalone
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Install Graphviz
run: sudo apt-get -y install graphviz
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Grant execute permission for mvnw
run: chmod +x mvnw
- name: Configure Git user
run: |
git config --global user.email "[email protected]"
git config --global user.name "Context Mapper CI"
- name: Publish Eclipse plugin with Maven
run: ./mvnw --settings ./.github/workflows/settings.xml clean deploy -Prelease-composite -Prelease-final-version -Dgithub-update-repo=https://${{ secrets.GH_CI_USERNAME }}:${{ secrets.GH_CI_TOKEN }}@github.com/ContextMapper/eclipse-update-site