From b6307f82495cb3f8121a783dbfb51ccc549ced99 Mon Sep 17 00:00:00 2001 From: David Gregorczyk <54440227+d-gregorczyk@users.noreply.github.com> Date: Thu, 12 Sep 2024 14:52:28 +0200 Subject: [PATCH] Zip (#311) * Add release workflow * Update release workflow * Update release workflow * Update release workflow --- .github/{copy_images.sh => prepare_artifacts.sh} | 3 +++ .github/workflows/feature-review-build.yml | 2 +- .github/workflows/latest-master-build.yml | 2 +- .github/workflows/release-build.yml | 4 ++-- 4 files changed, 7 insertions(+), 4 deletions(-) rename .github/{copy_images.sh => prepare_artifacts.sh} (84%) diff --git a/.github/copy_images.sh b/.github/prepare_artifacts.sh similarity index 84% rename from .github/copy_images.sh rename to .github/prepare_artifacts.sh index 5e8ceff..2a241d6 100755 --- a/.github/copy_images.sh +++ b/.github/prepare_artifacts.sh @@ -13,3 +13,6 @@ cp -R asciidoc/css sdpi-supplement/css cp -R asciidoc/fonts sdpi-supplement/fonts rm -rf sdpi-supplement/.asciidoctor rm -rf sdpi-supplement/readme.md + +sudo apt-get install zip gzip tar +zip -r "sdpi-supplement-$1.zip" sdpi-supplement \ No newline at end of file diff --git a/.github/workflows/feature-review-build.yml b/.github/workflows/feature-review-build.yml index 4e4b5f0..0a499e5 100755 --- a/.github/workflows/feature-review-build.yml +++ b/.github/workflows/feature-review-build.yml @@ -39,7 +39,7 @@ jobs: working-directory: .ci/asciidoc-converter - name: Generate PlantUML diagrams and copy images - run: .github/copy_images.sh + run: .github/prepare_artifacts.sh "x.x.x" - name: Extract branch name shell: bash diff --git a/.github/workflows/latest-master-build.yml b/.github/workflows/latest-master-build.yml index d358344..7573794 100755 --- a/.github/workflows/latest-master-build.yml +++ b/.github/workflows/latest-master-build.yml @@ -42,7 +42,7 @@ jobs: working-directory: .ci/asciidoc-converter - name: Generate PlantUML diagrams and copy images - run: .github/copy_images.sh + run: .github/prepare_artifacts.sh "x.x.x" - name: Upload artifact # if: success() && github.ref == 'refs/heads/master' diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index 1588d37..38e5430 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -42,7 +42,7 @@ jobs: working-directory: .ci/asciidoc-converter - name: Generate PlantUML diagrams and copy images - run: .github/copy_images.sh + run: .github/prepare_artifacts.sh "${{ github.ref_name }}" - name: Upload artifact # if: success() && github.ref == 'refs/heads/master' @@ -57,5 +57,5 @@ jobs: name: "Release of ${{ github.ref_name }} for TI" makeLatest: true body: "[đź“‹Please click here for a detailed changelog](https://github.com/IHE/DEV.SDPi/blob/${{ github.ref_name }}/CHANGELOG.md)" - artifacts: "sdpi-supplement.zip" + artifacts: "sdpi-supplement-${{ github.ref_name }}.zip"