commit workflow. #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Java CI with Maven | |
on: | |
push: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: setup Java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
- name: Install Maven 3.9.6 | |
run: | | |
wget https://downloads.apache.org/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz | |
tar -xvf apache-maven-3.9.6-bin.tar.gz | |
sudo mv apache-maven-3.9.6 /usr/local/apache-maven | |
rm apache-maven-3.9.6-bin.tar.gz | |
sudo update-alternatives --install /usr/bin/mvn mvn /usr/local/apache-maven/bin/mvn 1 | |
- name: Build with Maven | |
- run: mvn -B package --file pom.xml | |
- run: mkdir staging && cp target/*.jar staging | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: Package | |
path: staging |