Develop #159
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: Build Spring Boot Project | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
run-tests: | |
name: Run Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Build with Maven | |
run: mvn -B package -DskipTests --file pom.xml | |
- name: Distribute jar-war file | |
run: mkdir staging && cp target/*.jar staging | |
- name: Make hyperlink to jar-war file # Tạo hyperlink để download build | |
uses: actions/upload-artifact@v2 | |
with: | |
name: 1.0-SNAPSHOT.jar # Bản build được đánh version 1.0-SNAPSHOT | |
path: staging | |