Update maven.yml

This commit is contained in:
lilingfengdev 2024-01-30 18:04:22 +08:00 committed by GitHub
parent 55418d23a2
commit c4f9c59bb4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 23 additions and 11 deletions

View File

@ -16,9 +16,8 @@ on:
jobs:
build:
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
@ -26,15 +25,28 @@ jobs:
with:
java-version: '17'
distribution: 'temurin'
cache: maven
server-id: phoenixdevt-releases
- name: Install depends
run: mvn install
- name: Build with Maven
run: mvn -B package --file pom.xml
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
- name: Update dependency graph
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
run: mvn package
- run: mkdir staging && cp target/*.jar staging
- uses: actions/upload-artifact@v3
# - name: Set Release version env variable
# run: |
# echo "RELEASE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
# - name: "Build & test"
# run: |
# echo "done!"
# - uses: "marvinpinto/action-automatic-releases@latest"
# with:
# repo_token: "${{ secrets.GITHUB_TOKEN }}"
# automatic_release_tag: "${{ env.RELEASE_VERSION }}"
# prerelease: false
# title: "Release ${{ env.RELEASE_VERSION }}"
# files: |
# staging/*.jar
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: Package
path: staging
name: Citizens
path: staging/*.jar