HIRS/.github/workflows/hirs_package_linux.yml

80 lines
2.4 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
2024-07-16 13:21:20 +00:00
mkdir -p artifacts/win
2023-10-16 17:00:14 +00:00
- 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;
2024-07-15 19:16:57 +00:00
./gradlew buildZip
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/.
2024-07-16 12:41:44 +00:00
cp tools/tcg_rim_tool/build/distributions/*.zip artifacts/win
2024-07-16 13:12:58 +00:00
cp package/win/tcg-rim-tool/*.ps1 artifacts/win
2023-10-16 17:00:14 +00:00
- name: Archive RPM files
2024-07-16 15:48:59 +00:00
uses: actions/upload-artifact@v4
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
2024-07-16 15:48:59 +00:00
uses: actions/upload-artifact@v4
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
2024-07-16 15:48:59 +00:00
uses: actions/upload-artifact@v4
2023-10-18 12:40:52 +00:00
with:
name: WAR_Files
path: HIRS_AttestationCAPortal/build/libs/HIRS_AttestationCAPortal.war
if-no-files-found: error
- name: JAR_Files
2024-07-16 15:48:59 +00:00
uses: actions/upload-artifact@v4
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
2024-07-15 19:05:31 +00:00
- name: ZIP_Files
2024-07-16 15:48:59 +00:00
uses: actions/upload-artifact@v4
2024-07-15 19:05:31 +00:00
with:
2024-07-15 19:16:57 +00:00
name: ZIP_Files
2024-07-16 12:41:44 +00:00
path: artifacts/win/
2024-07-15 19:16:57 +00:00
if-no-files-found: error
2024-07-15 19:05:31 +00:00
2023-10-18 12:40:52 +00:00