forked from cetra3/onlyoffice-alfresco
-
Notifications
You must be signed in to change notification settings - Fork 32
41 lines (40 loc) · 1.36 KB
/
artifact.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
name: Artifact
on:
workflow_dispatch:
pull_request:
types: [opened, reopened]
branches: [master]
jobs:
artifact:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Get Info
run: |
echo "artifact=$(awk '/<artifactId>/,/<\/artifactId>/' pom.xml | head -n 1 | sed 's/^[[:space:]]*//g' | sed -n 's:.*<artifactId>\(.*\)</artifactId>.*:\1:p')" >> $GITHUB_OUTPUT
id: info
- name: Install Java 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- name: Build Artifact
run: |
cd ${{ github.workspace }}
cwd=$(pwd)
git submodule update --init --recursive
mvn -version
mvn clean install
mv ./repo/target/${{ steps.info.outputs.artifact }}-repo.amp $cwd
mv ./share/target/${{ steps.info.outputs.artifact }}-share.amp $cwd
- name: Upload Repo Artifact
uses: actions/upload-artifact@v3
with:
name: ${{ steps.info.outputs.artifact }}-repo
path: ${{ steps.info.outputs.artifact }}-repo.amp
- name: Upload Share Artifact
uses: actions/upload-artifact@v3
with:
name: ${{ steps.info.outputs.artifact }}-share
path: ${{ steps.info.outputs.artifact }}-share.amp