From d4b6dcc96d214947937e4e79a89a07d4b5b9c016 Mon Sep 17 00:00:00 2001 From: axtloss Date: Sat, 24 Aug 2024 22:23:09 +0200 Subject: [PATCH] add ci that allows for releases --- .../workflows/{vib-build.yml => build.yml} | 3 ++- .github/workflows/{vib-pr.yml => release.yml} | 27 ++++++++++++++----- 2 files changed, 23 insertions(+), 7 deletions(-) rename .github/workflows/{vib-build.yml => build.yml} (96%) rename .github/workflows/{vib-pr.yml => release.yml} (55%) diff --git a/.github/workflows/vib-build.yml b/.github/workflows/build.yml similarity index 96% rename from .github/workflows/vib-build.yml rename to .github/workflows/build.yml index 0199bc2..72dfbd3 100644 --- a/.github/workflows/vib-build.yml +++ b/.github/workflows/build.yml @@ -3,6 +3,8 @@ name: Vib Build on: push: branches: [ "main" ] + pull-request: + branches: [ "main" ] workflow_dispatch: jobs: @@ -33,7 +35,6 @@ jobs: - name: Build the Docker image run: | sudo chmod 777 plugins/* - sudo ls -al plugins/ sudo su -c "./vib compile --runtime podman" sudo chmod 777 genimg/build/vanilla_installer.iso diff --git a/.github/workflows/vib-pr.yml b/.github/workflows/release.yml similarity index 55% rename from .github/workflows/vib-pr.yml rename to .github/workflows/release.yml index 6f68048..89d56ca 100644 --- a/.github/workflows/vib-pr.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,9 @@ name: Vib PR on: - pull_request: - branches: [ "main" ] - + push: + tags: + - "*" jobs: @@ -39,8 +39,23 @@ jobs: sudo su -c "./vib compile --runtime podman" sudo chmod 777 genimg/build/vanilla_installer.iso + - name: generate checksums + run: | + cd genimg/build + sha512sum vanilla_installer.iso > ../../vanilla_installer.iso.DIGESTS + sha256sum vanilla_installer.iso > ../../vanilla_installer.iso.DIGESTS + md5sum vanilla_installer.iso >> ../../vanilla_installer.iso.DIGESTS + - name: Upload iso - uses: actions/upload-artifact@v4 + if: github.repository == 'Vanilla-OS/installer-image' + uses: softprops/action-gh-release@v2 + with: + files: | + genimg/build/vanilla_installer.iso + + - name: Attest generated files + if: github.repository == 'Vanilla-OS/installer-image' + id: attest + uses: actions/attest-build-provenance@v1 with: - Name: iso - Path: genimg/build/vanilla_installer.iso + subject-path: 'genimg/build/vanilla_installer.iso'