HIRS/.github/workflows/hirs_package_linux.yml

83 lines
2.5 KiB
YAML
Raw Normal View History

name: HIRS build and packages for Linux
2023-10-16 13:00:14 -04: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 14:04:10 -04:00
Package_linux:
2023-10-16 13:00:14 -04:00
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
2023-10-16 13:56:27 -04:00
- uses: actions/checkout@v4
2023-10-16 13:00:14 -04:00
- name: Set up JDK 17
2024-07-25 12:38:38 -04:00
uses: actions/setup-java@v4
2023-10-16 13:00:14 -04:00
with:
java-version: '17'
2023-10-16 13:56:27 -04:00
distribution: 'temurin'
2023-10-16 13:00:14 -04: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
2024-07-16 09:21:20 -04:00
mkdir -p artifacts/win
2023-10-16 13:00:14 -04:00
- name: install dependencies
run: |
sudo apt-get update
sudo apt-get install git curl nano cron mariadb-server
- name: Setup Gradle
2024-07-25 12:38:38 -04:00
uses: gradle/actions/setup-gradle@v3
2023-10-16 13:00:14 -04:00
- name: Execute Gradle build
run: |
./gradlew build;
./gradlew bootWar;
./gradlew buildDeb;
./gradlew buildRpm;
2024-07-15 15:16:57 -04:00
./gradlew buildZip
2023-10-16 13:39:49 -04: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/.
2024-07-16 08:41:44 -04:00
cp tools/tcg_rim_tool/build/distributions/*.zip artifacts/win
2024-07-17 11:00:50 -04:00
cp tools/tcg_eventlog_tool/build/distributions/*.zip artifacts/win
cp package/win/tcg-rim-tool/* artifacts/win
2024-07-17 11:00:50 -04:00
2023-10-16 13:00:14 -04:00
- name: Archive RPM files
2024-07-16 11:48:59 -04:00
uses: actions/upload-artifact@v4
2023-10-16 13:00:14 -04:00
with:
name: RPM_Files
2023-10-18 08:40:52 -04:00
path: HIRS_AttestationCAPortal/build/distributions/*.rpm
2023-10-16 13:00:14 -04:00
if-no-files-found: error
- name: Archive DEB files
2024-07-25 12:38:38 -04:00
uses: actions/upload-artifact@v4
2023-10-16 13:00:14 -04:00
with:
name: DEB_Files
2023-10-18 08:40:52 -04:00
path: HIRS_AttestationCAPortal/build/distributions/*.deb
2023-10-16 13:00:14 -04:00
if-no-files-found: error
2023-10-18 08:40:52 -04:00
- name: War files
2024-07-25 12:38:38 -04:00
uses: actions/upload-artifact@v4
2023-10-18 08:40:52 -04:00
with:
name: WAR_Files
path: HIRS_AttestationCAPortal/build/libs/HIRS_AttestationCAPortal.war
if-no-files-found: error
- name: JAR_Files
2024-07-25 12:38:38 -04:00
uses: actions/upload-artifact@v4
2023-10-16 13:00:14 -04:00
with:
name: JAR_Files
path: artifacts/jars/
2023-10-18 08:40:52 -04:00
if-no-files-found: error
2024-07-15 15:05:31 -04:00
- name: ZIP_Files
2024-07-25 12:38:38 -04:00
uses: actions/upload-artifact@v4
2024-07-15 15:05:31 -04:00
with:
2024-07-15 15:16:57 -04:00
name: ZIP_Files
2024-07-16 08:41:44 -04:00
path: artifacts/win/
2024-07-15 15:16:57 -04:00
if-no-files-found: error
2024-07-15 15:05:31 -04:00
2024-07-24 15:52:26 -04:00