dotnet_provisioner_unit_tests workflow will use newer actions (#840) #608
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
name: HIRS build and packages for Linux | |
on: | |
push: | |
branches: | |
- '*v3*' | |
- 'main' | |
workflow_dispatch: | |
jobs: | |
# run the package script for HIRS ACA, Provisioners, tcg_rim_tool, and tcg_eventlog_tool | |
Package_linux: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
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 | |
mkdir -p artifacts/win | |
mkdir -p artifacts/win/hirstools | |
- name: install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install git curl nano cron mariadb-server | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Execute Gradle build | |
run: | | |
./gradlew build; | |
./gradlew bootWar; | |
./gradlew buildDeb; | |
./gradlew buildRpm; | |
./gradlew buildZip | |
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/. | |
cp tools/tcg_rim_tool/build/distributions/*.zip artifacts/win | |
cp tools/tcg_eventlog_tool/build/distributions/*.zip artifacts/win | |
cp package/win/tcg-rim-tool/* artifacts/win/hirstools | |
- name: Archive RPM files | |
uses: actions/upload-artifact@v4 | |
with: | |
name: RPM_Files | |
path: HIRS_AttestationCAPortal/build/distributions/*.rpm | |
if-no-files-found: error | |
- name: Archive DEB files | |
uses: actions/upload-artifact@v4 | |
with: | |
name: DEB_Files | |
path: HIRS_AttestationCAPortal/build/distributions/*.deb | |
if-no-files-found: error | |
- name: War files | |
uses: actions/upload-artifact@v4 | |
with: | |
name: WAR_Files | |
path: HIRS_AttestationCAPortal/build/libs/HIRS_AttestationCAPortal.war | |
if-no-files-found: error | |
- name: JAR_Files | |
uses: actions/upload-artifact@v4 | |
with: | |
name: JAR_Files | |
path: artifacts/jars/ | |
if-no-files-found: error | |
- name: ZIP_Files | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ZIP_Files | |
path: artifacts/win/ | |
if-no-files-found: error | |