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: jobs:
build: build:
permissions: write-all
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Set up JDK 17 - name: Set up JDK 17
@ -26,15 +25,28 @@ jobs:
with: with:
java-version: '17' java-version: '17'
distribution: 'temurin' distribution: 'temurin'
cache: maven server-id: phoenixdevt-releases
- name: Install depends
run: mvn install
- name: Build with Maven - name: Build with Maven
run: mvn -B package --file pom.xml run: mvn package
# 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: mkdir staging && cp target/*.jar staging - 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: with:
name: Package name: Citizens
path: staging path: staging/*.jar