-
Notifications
You must be signed in to change notification settings - Fork 5
53 lines (51 loc) · 1.64 KB
/
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
name: Publishing
on: [push]
jobs:
test:
uses: ./.github/workflows/test.yml
publish:
name: Publish the client to the public registry
needs: [test]
runs-on: ubuntu-22.04
env:
MVNSETTINGS: ${{ secrets.MVNSETTINGS }}
PRIVATEKEY: ${{ secrets.PRIVATEKEY }}
GPGKEY: ${{ secrets.GPGKEY }}
strategy:
matrix:
java: [ '17' ]
services:
manticoresearch-manticore:
image: manticoresearch/manticore:dev
env:
EXTRA: 1
ports:
- 9408:9308
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: maven
- name: Check for dev-version
if: ${{ contains(github.ref, 'master') }}
run: |
VERSION=`git log -1 --date=format:"%y%m%d%H" --format=%cd-%h|head`
echo "version $VERSION"
sed -i -E "s/(\<version\>)([0-9]\.[0-9]\.)(.*)(\<)/\1\2$VERSION\4/1" pom.xml
- name: Publish
run: |
sleep 3m
mkdir -p ~/.m2
export GPG_TTY=$(tty)
export MAVEN_OPTS="--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED"
echo "$MVNSETTINGS" > ~/.m2/settings.xml
echo "import"
echo "$PRIVATEKEY" > ~/key
gpg2 --import --batch ~/key
echo "verify"
mvn install -Dmaven.test.skip.exec=true -DskipTests=true -Dmaven.test.skip=true -Dgpg.passphrase=$GPGKEY
echo "deploy"
mvn clean deploy -e -X