-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (44 loc) · 1.32 KB
/
build.yaml
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
name: Build JAR with Maven
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '17'
- name: Build with Maven
run: mvn clean package -f ./JGNN/pom.xml -DskipTests
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v1.3.${{ github.run_number }}-nightly
release_name: Release v1.3.${{ github.run_number }}-nightly
draft: false
prerelease: true
continue-on-error: false
- name: Set upload_url environment variable
run: echo "upload_url=${{ steps.create_release.outputs.upload_url }}" >> $GITHUB_ENV
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ env.upload_url }}
asset_path: ./JGNN/target/JGNN-nightly.jar
asset_name: JGNN v1.3.${{ github.run_number }}-nightly.jar
asset_content_type: application/java-archive
continue-on-error: false