Skip to content

Commit

Permalink
ci: integrate ci building process
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex4386 authored Mar 6, 2024
1 parent 46993b4 commit f8c071f
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
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)
test -z "$VER_TAG" && 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

0 comments on commit f8c071f

Please sign in to comment.