-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (42 loc) · 1.32 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
name: Release
on:
workflow_dispatch:
push:
branches: [ master ]
jobs:
build_release:
name: Build & Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup - Java
uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'temurin'
- name: Setup - Restore Cache
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-:
- name: Build - Maven Package
run: mvn -B clean package -DskipTests
- name: Test - Maven Verify
run: mvn -B clean verify
- name: Release - Create Draft for Release
id: create_draft
uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release - Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_draft.outputs.upload_url }}
asset_path: ./target/javgent-standalone.jar
asset_name: javgent-standalone.jar
asset_content_type: application/java-archive