34 lines
1.2 KiB
YAML
34 lines
1.2 KiB
YAML
name: Build with maven
|
|
run-name: build promql java client
|
|
on:
|
|
push: {}
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
RUNNER_TOOL_CACHE: /toolcache # Runner Tool Cache
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '21'
|
|
distribution: 'temurin'
|
|
# Workaround from https://github.com/nektos/act/issues/161
|
|
- name: Download Maven
|
|
run: |
|
|
curl -sL https://downloads.apache.org/maven/maven-3/3.9.8/binaries/apache-maven-3.9.8-bin.zip -o maven.zip
|
|
apt-get update
|
|
apt-get -y install unzip
|
|
unzip -d /usr/share maven.zip
|
|
rm maven.zip
|
|
ln -s /usr/share/apache-maven-3.9.8/bin/mvn /usr/bin/mvn
|
|
echo "M2_HOME=/usr/share/apache-maven-3.9.8" | tee -a /etc/environment
|
|
- name: Set maven settings
|
|
uses: whelk-io/maven-settings-xml-action@v22
|
|
with:
|
|
servers: '[{ "id": "gitea", "configuration": {"httpHeaders": {"property": {"name": "Authorization", "value": "token ${{ secrets.MAVEN_TOKEN }}"}}}}]'
|
|
- name: Build
|
|
run: cd promql_client; mvn --no-transfer-progress --batch-mode clean install deploy
|
|
|