-
-
Notifications
You must be signed in to change notification settings - Fork 109
72 lines (60 loc) · 2.18 KB
/
build.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: Java CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
- name: Dependency Test
run: mvn test -Dtest=org.myrobotlab.framework.DependencyTest -q
- name: Build and Test with Maven
run: mvn --batch-mode -Dtest=!**/OpenCV* test -q
- name: Package with Maven
run: mvn package -DskipTests
# - name: Determine Next Version
# id: next_version
# run: |
# current_version=$(cat version.txt)
# major_minor="1.1."
# increment_version=$((current_version + 1))
# next_version="${major_minor}${increment_version}"
# echo "$next_version" > version.txt
# echo "next_version=${next_version}" >> $GITHUB_OUTPUT
- name: Get next version
uses: reecetech/[email protected]
id: version
with:
scheme: semver
increment: patch
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
token: ${{ secrets.ACCESS_TOKEN }}
files: ./target/myrobotlab.zip
# - name: Create Release
# id: create_release
# uses: actions/create-release@v1
# env:
# # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} default expires
# GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
# with:
# tag_name: ${{ steps.version.outputs.version }}
# release_name: Release ${{ steps.version.outputs.version }}
# draft: false
# prerelease: false
# - name: Upload Release Artifacts
# uses: actions/upload-release-asset@v1
# env:
# # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} default expires
# GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: ./target/myrobotlab.zip
# asset_name: myrobotlab.zip
# asset_content_type: application/zip