-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
preparazione rilascio versione 1.0.0 (#4)
* Aggiornato stack applicativo a java21. Risolte segnalazioni sonar. Risolte vulnerabilita' librerie * Estratte costanti per pattern delle date. * Aggiunto log con logback * Eliminata esecuzione test.
- Loading branch information
Showing
22 changed files
with
703 additions
and
360 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven | ||
|
||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: Java CI with Maven | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
tags: | ||
- '*' # Trigger per tutti i tag | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
permissions: | ||
contents: write | ||
id-token: write | ||
actions: write | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set timezone to Europe/Rome | ||
run: sudo timedatectl set-timezone Europe/Rome | ||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '21' | ||
distribution: 'temurin' | ||
cache: maven | ||
- name: Build with Maven | ||
run: mvn clean install -P jar -DskipTests -Ddependency-check.skip=true | ||
|
||
- name: Upload artifact to GitHub | ||
uses: actions/upload-artifact@v4.6.0 | ||
with: | ||
name: govpay-gde-api | ||
path: target/govpay-gde-api.war | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
if: startsWith(github.ref, 'refs/tags/') # Esegui solo per i tag | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download artifact from build job | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: govpay-gde-api | ||
path: target/ # Assicurati che il file venga scaricato nella cartella target | ||
|
||
- name: Rename the artifact file to include the tag | ||
run: cp target/govpay-gde-api.war target/govpay-gde-api-${{ github.ref_name }}.war # Rinominare il file | ||
|
||
- name: List files in target directory | ||
run: ls -l target/ | ||
|
||
- name: Create GitHub release | ||
id: create_release | ||
uses: softprops/action-gh-release@v2.2.1 | ||
with: | ||
files: target/govpay-gde-api-${{ github.ref_name }}.war # Specifica l'artefatto da caricare | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |
Oops, something went wrong.