From 66d6f31eec5097c3c830d4722ef81ec57778bc96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wawrzyniec=20=27Wawrzek=27=20Niewodnicza=C5=84ski?= Date: Thu, 11 Jul 2024 20:28:49 +0100 Subject: [PATCH 1/5] Build on main push - we need to build on main push (I think) --- .github/workflows/build.yml | 2 -- .github/workflows/release.yml | 27 +++++++++++++++++++++++++-- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 871f774..19ca82d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,8 +1,6 @@ name: Build on: - push: - branches: [ "main" ] pull_request: branches: [ "main" ] diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 91df706..3976f97 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,9 +8,32 @@ env: CARGO_TERM_COLOR: always jobs: - build: - runs-on: ubuntu-latest steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Build + run: ./build.sh + + - name: Service and enclave artifacts + uses: actions/upload-artifact@v4 + with: + name: glove-service + path: | + target/release/service + target/release/glove.eif + + - name: Enclave measurement artifact + uses: actions/upload-artifact@v4 + with: + name: enclave_measurement + path: target/release/enclave_measurement.txt + + - name: Adding measurement to summary + run: | + echo '### Enclave Image Measurement' >> $GITHUB_STEP_SUMMARY + cat target/release/enclave_measurement.txt >> $GITHUB_STEP_SUMMARY + - name: Add software to the releases page uses: softprops/action-gh-release@v2 with: From bce7c3cb05eecf7363198b4fd0d6a699a513aecc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wawrzyniec=20=27Wawrzek=27=20Niewodnicza=C5=84ski?= Date: Thu, 11 Jul 2024 20:29:58 +0100 Subject: [PATCH 2/5] Fix (too much deletion) --- .github/workflows/release.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3976f97..923c447 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,6 +8,9 @@ env: CARGO_TERM_COLOR: always jobs: + build: + runs-on: ubuntu-latest + steps: - name: Checkout repository uses: actions/checkout@v4 From ce5d8f01f9a942fbb466ea25b56ec9011a31d746 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wawrzyniec=20=27Wawrzek=27=20Niewodnicza=C5=84ski?= Date: Thu, 11 Jul 2024 23:00:53 +0100 Subject: [PATCH 3/5] Address comments --- .github/workflows/{build.yml => pr.yml} | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename .github/workflows/{build.yml => pr.yml} (97%) diff --git a/.github/workflows/build.yml b/.github/workflows/pr.yml similarity index 97% rename from .github/workflows/build.yml rename to .github/workflows/pr.yml index 19ca82d..bf27b1f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/pr.yml @@ -1,4 +1,4 @@ -name: Build +name: Build for PR on: pull_request: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 923c447..5569137 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,7 +37,7 @@ jobs: echo '### Enclave Image Measurement' >> $GITHUB_STEP_SUMMARY cat target/release/enclave_measurement.txt >> $GITHUB_STEP_SUMMARY - - name: Add software to the releases page + - name: Make release uses: softprops/action-gh-release@v2 with: files: | From 716d35045e1de5fb4fd97a43955718370cf30b1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wawrzyniec=20=27Wawrzek=27=20Niewodnicza=C5=84ski?= Date: Fri, 12 Jul 2024 09:58:38 +0100 Subject: [PATCH 4/5] Remove one extra step --- .github/workflows/pr.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index bf27b1f..e3d07bd 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -18,14 +18,6 @@ jobs: - name: Build run: ./build.sh - - name: Service and enclave artifacts - uses: actions/upload-artifact@v4 - with: - name: glove-service - path: | - target/release/service - target/release/glove.eif - - name: Enclave measurement artifact uses: actions/upload-artifact@v4 with: From 3432a0eb95476d9bd556ea920a328d11718e5ec6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wawrzyniec=20=27Wawrzek=27=20Niewodnicza=C5=84ski?= Date: Fri, 12 Jul 2024 10:47:28 +0100 Subject: [PATCH 5/5] Try another action --- .github/workflows/release.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5569137..1b9dc69 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,10 +38,8 @@ jobs: cat target/release/enclave_measurement.txt >> $GITHUB_STEP_SUMMARY - name: Make release - uses: softprops/action-gh-release@v2 + uses: ncipollo/release-action@v1 with: - files: | - target/release/service - target/release/glove.eif - make_latest: true + artifacts: target/release/service, target/release/glove.eif + makeLatest: true prerelease: true # For now