HIRS/.github/workflows/hirs_package_linux.yml

69 lines
2.1 KiB
YAML
Raw Normal View History

name: HIRS build and packages for Linux
2023-10-16 17:00:14 +00:00
on:
push:
branches:
- '*v3*'
- 'main'
workflow_dispatch:
jobs:
# run the package script for HIRS ACA, Provisioners, tcg_rim_tool, and tcg_eventlog_tool
2023-10-16 18:04:10 +00:00
Package_linux:
2023-10-16 17:00:14 +00:00
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
2023-10-16 17:56:27 +00:00
- uses: actions/checkout@v4
2023-10-16 17:00:14 +00:00
- name: Set up JDK 17
2023-10-16 17:56:27 +00:00
uses: actions/setup-java@v3
2023-10-16 17:00:14 +00:00
with:
java-version: '17'
2023-10-16 17:56:27 +00:00
distribution: 'temurin'
2023-10-16 17:00:14 +00:00
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
- name: directory setup
run: |
mkdir -p artifacts/jars
- name: install dependencies
run: |
sudo apt-get update
sudo apt-get install git curl nano cron mariadb-server
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
2023-10-16 17:00:14 +00:00
- name: Execute Gradle build
run: |
./gradlew build;
./gradlew bootWar;
./gradlew buildDeb;
./gradlew buildRpm;
2023-10-16 17:39:49 +00:00
cp HIRS_AttestationCAPortal/build/libs/*.jar artifacts/jars/.
cp HIRS_AttestationCA/build/libs/*.jar artifacts/jars/.
cp HIRS_Utils/build/libs/*.jar artifacts/jars/.
cp HIRS_Structs/build/libs/*.jar artifacts/jars/.
2023-10-16 17:00:14 +00:00
- name: Archive RPM files
uses: actions/upload-artifact@v3
2023-10-16 17:00:14 +00:00
with:
name: RPM_Files
2023-10-18 12:40:52 +00:00
path: HIRS_AttestationCAPortal/build/distributions/*.rpm
2023-10-16 17:00:14 +00:00
if-no-files-found: error
- name: Archive DEB files
2023-10-16 18:11:35 +00:00
uses: actions/upload-artifact@v3
2023-10-16 17:00:14 +00:00
with:
name: DEB_Files
2023-10-18 12:40:52 +00:00
path: HIRS_AttestationCAPortal/build/distributions/*.deb
2023-10-16 17:00:14 +00:00
if-no-files-found: error
2023-10-18 12:40:52 +00:00
- name: War files
uses: actions/upload-artifact@v3
with:
name: WAR_Files
path: HIRS_AttestationCAPortal/build/libs/HIRS_AttestationCAPortal.war
if-no-files-found: error
- name: JAR_Files
2023-10-16 18:11:35 +00:00
uses: actions/upload-artifact@v3
2023-10-16 17:00:14 +00:00
with:
name: JAR_Files
path: artifacts/jars/
2023-10-18 12:40:52 +00:00
if-no-files-found: error