-
Notifications
You must be signed in to change notification settings - Fork 442
57 lines (53 loc) · 1.9 KB
/
eclipse-snapshots.yml
File metadata and controls
57 lines (53 loc) · 1.9 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
name: eclipse-snapshots
on:
push:
branches:
- main
- '[0-9]+.[0-9]+.x'
permissions: # added using https://github.com/step-security/secure-repo
contents: read
env:
JAVA_VERSION: 17
MAVEN_CLI_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false --batch-mode
jobs:
publish-eclipse-snapshots:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[maven-release-plugin] prepare release')"
strategy:
fail-fast: false
matrix:
version: [ "2.12", "2.13" ]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: temurin
java-version: "${{ env.JAVA_VERSION }}"
- uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
key: ${{ hashFiles('**/pom.xml') }}-eclipse-snapshots-${{ matrix.version }}
path: ~/.m2/repository/
- name: Create settings.xml
run: |
mkdir -p ~/.m2
cat > ~/.m2/settings.xml <<EOF
<settings>
<servers>
<server>
<id>repo.eclipse.org</id>
<username>${{ secrets.REPO_TOKEN_USERNAME }}</username>
<password>${{ secrets.REPO_TOKEN_PASSWORD }}</password>
</server>
</servers>
</settings>
EOF
- name: Set Scala version
run: ./build/scripts/change-scala-version.sh ${{ matrix.version }}
- name: Build with Maven
run: mvn clean deploy -Peclipse -DskipTests -Dmaven.deploy.at.end=false $MAVEN_CLI_OPTS
- name: Remove geomesa artifacts
if: success() || failure()
run: rm -rf ~/.m2/repository/org/locationtech/geomesa
- name: Remove settings.xml
if: success() || failure()
run: rm ~/.m2/settings.xml