feat: implemented homeworks #10
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 ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
cache: 'maven' | |
- name: change version to SNAPSHOT | |
run: | | |
VER_TAG=$(git describe --tags --abbrev=0) || VER_TAG="0.0.1" | |
mvn versions:set -DnewVersion=${VER_TAG}-SNAPSHOT | |
- name: Build with Maven | |
run: mvn package | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
# Artifact name | |
name: JavaProgramming.jar | |
# A file, directory or wildcard pattern that describes what to upload | |
path: target/**/sw14462-*.jar |