-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (36 loc) · 1.29 KB
/
main.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
name: CI
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: "check out the repo"
uses: actions/checkout@v3
- name: "setup java"
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: "Test"
run: |
make test
- name: "make release"
if: startsWith(github.ref, 'refs/tags/v')
run: |
sudo make install-dependencies
make init
make archive REPOSITORY_NAME=${{ github.event.repository.name }}
- name: "make package"
if: startsWith(github.ref, 'refs/tags/v')
run: |
mvn -B -DnewVersion=v$(cat doc/VERSION) -DgenerateBackupPoms=false versions:set
mvn --batch-mode deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: lib/${{ github.event.repository.name }}.jar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}