-
Notifications
You must be signed in to change notification settings - Fork 16
57 lines (47 loc) · 1.62 KB
/
attach_jar.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
name: Build and Attach pathetic-example jar to release
on:
release:
types: [published]
jobs:
build-and-release:
name: Build and Attach
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
distribution: 'corretto'
java-package: 'jdk'
java-version: '17'
- name: Set up Maven
uses: stCarolas/setup-maven@v4.4
with:
maven-version: 3.8.6
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml', '**/*.target') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Clean install
run: mvn clean install -U
- name: Build Pathetic-Example
run: |
mvn -U -V -e -B -ntp clean install compile package -pl pathetic-example -amd -DskipTests
- name: Upload Pathetic-Example
uses: actions/upload-artifact@v3
with:
name: pathetic-example
path: D:\a\pathetic\pathetic\pathetic-example\target\pathetic-example.jar
- name: Attach pathetic-example jar to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: D:\a\pathetic\pathetic\pathetic-example\target\pathetic-example.jar
asset_name: pathetic-example.jar
asset_content_type: application/java-archive