-
Notifications
You must be signed in to change notification settings - Fork 3
46 lines (36 loc) · 1.17 KB
/
maven-publish.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
name: Maven Package
on:
push:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
server-id: github
settings-path: ${{ github.workspace }}
- name: Get version
run: git describe --tags && echo "RELEASE_VERSION=$(git describe --tags)" >> $GITHUB_ENV
- name: Build
run: docker build . --tag builder
- name: Run
run: docker run -v ${{ github.workspace }}:/code:Z builder
- name: Publish to GitHub Packages Apache Maven
run: mvn -s ${{ github.workspace}}/settings.xml -f rpm.pom.xml -B -Drevision=${{ env.RELEASE_VERSION }} -Dsha1= -Dchangelist= deploy
env:
GITHUB_TOKEN: ${{ github.token }}
GITHUB_RUN_NUMBER: ${{ github.run_number }}
- name: Attach rpm as artifact
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: target/rpm/com.teragrep-blf_02/RPMS/x86_64/com.teragrep-blf_02-*.rpm