-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
72 lines (70 loc) · 2.38 KB
/
maven-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
name: maven-release
on:
workflow_dispatch:
inputs:
version:
required: true
default: 'X.X.X.RCX'
docker:
required: true
type: choice
options:
- 'enabled'
- 'disabled'
jobs:
build:
timeout-minutes: 20
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v4
- name: set up jdk 17
uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 17
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: set maven version
run: |
mvn versions:set versions:commit -B -ntp -DnewVersion=${{ github.event.inputs.version }}
- name: docker build
if: ( github.event.inputs.docker == 'enabled' )
run: |
mvn clean install -B -ntp -DskipTests -P pre-release
./build-docker.sh
- name: docker login
if: ( github.event.inputs.docker == 'enabled' )
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: docker push
if: ( github.event.inputs.docker == 'enabled' )
run: |
docker tag karate-chrome karatelabs/karate-chrome:${{ github.event.inputs.version }}
docker tag karate-chrome karatelabs/karate-chrome:latest
docker push karatelabs/karate-chrome:${{ github.event.inputs.version }}
docker push karatelabs/karate-chrome:latest
- name: maven deploy to central
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_TOKEN_USER }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
run: |
mvn -B -ntp deploy -DskipTests -P pre-release,release
- name: maven build binaries
run: |
mvn package -DskipTests -P fatjar -f karate-core/pom.xml
mvn package -DskipTests -P fatjar -f karate-robot/pom.xml
- name: upload binaries
uses: actions/upload-artifact@v4
with:
name: karate-release-${{ github.event.inputs.version }}
retention-days: 5
path: |
karate-core/target/*.jar
karate-robot/target/*.jar