-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (70 loc) · 2.29 KB
/
on_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
name: Release
on:
release:
types: [published]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
env:
OSS_USERNAME: ${{ secrets.OSS_USERNAME }}
OSS_PASSWORD: ${{ secrets.OSS_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
VERSION: ${{ github.ref_name }}
steps:
- uses: actions/checkout@v3
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: 'maven'
- name: Update java version
run: mvn versions:set -DnewVersion=${VERSION} -B -U
- name: Build and Release
run: mvn -s .ci-settings.xml clean deploy -DskipTests -P release-ossrh -B -U -pl agent,deep --also-make
- name: Upload agent to release
uses: svenstaro/upload-release-action@v2
with:
file: ./agent/target/agent-${VERSION}.jar
asset_name: Deep Agent
tag: ${{ github.ref_name }}
overwrite: true
- name: Upload lite agent to release
uses: svenstaro/upload-release-action@v2
with:
file: ./agent/target/agent-${VERSION}-lite.jar
asset_name: Deep Lite Agent
tag: ${{ github.ref_name }}
overwrite: true
JavaSite:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: 'maven'
- name: Update java version
run: mvn versions:set -DnewVersion=${VERSION} -B -U
- name: Package project
run: mvn clean package -DskipTests -U -B -P cf-it-tests,examples
- name: Build site
run: mvn -U -B site:site site:stage -P docs,cf-it-tests,examples
- name: Zip Site
run: tar -czf site.tar.gz target/staging
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
file: site.tar.gz
asset_name: Maven Site
tag: ${{ github.ref_name }}
overwrite: true