Skip to content

Artifact

Artifact #25

Workflow file for this run

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@v4
- 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@v4
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@v4
with:
name: ${{ steps.info.outputs.artifact }}-repo
path: ${{ steps.info.outputs.artifact }}-repo.amp
- name: Upload Share Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ steps.info.outputs.artifact }}-share
path: ${{ steps.info.outputs.artifact }}-share.amp