From 6dd0b47df2757a61cb4c1a6b554ba4bec1828d72 Mon Sep 17 00:00:00 2001 From: suchitra Date: Mon, 11 Sep 2023 16:06:16 +0100 Subject: [PATCH] zipping the artifacts before uploading --- .github/workflows/build.yml | 15 +++--------- .github/workflows/release.yml | 44 +++++++++++++++++++++++++++++++++++ build_robohelp_gh.bat | 6 ++--- 3 files changed, 50 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3682f364f..e74259b76 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,10 +2,6 @@ on: pull_request: branches: - develop - - main - workflow_dispatch: - schedule: - - cron: '0 4 * * 1-5' env: S3_BUCKET: ${{ secrets.S3_BUCKET }} @@ -17,7 +13,7 @@ jobs: name: "RoboHelp" runs-on: windows-2019 steps: - - uses: aws-actions/configure-aws-credentials@v1-node16 + - uses: aws-actions/configure-aws-credentials@v3 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} @@ -33,15 +29,10 @@ jobs: if: github.event.pull_request.base.ref == 'develop' run: build_robohelp_gh.bat -beta %GITHUB_WORKSPACE%\output shell: cmd - working-directory: Manual - - name: Builds - if: github.event.pull_request.base.ref == 'main' - run: build_robohelp_gh.bat %GITHUB_WORKSPACE%\output - shell: cmd - working-directory: Manual + working-directory: Manual - name: Upload robohelp zip file uses: actions/upload-artifact@v2 with: name: YoYoStudioRoboHelp - path: output\RoboHelp + path: output\RoboHelp\*.zip if-no-files-found: error diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..3cb95ab4a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,44 @@ +on: + pull_request: + branches: + - main + +env: + S3_BUCKET: ${{ secrets.S3_BUCKET }} + ZIP_FILE: ${{ secrets.ZIP_FILE }} + +jobs: + + RoboHelp: + name: "RoboHelp" + runs-on: windows-2019 + steps: + - uses: aws-actions/configure-aws-credentials@v1-node16 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ secrets.REGION }} + - name: Enable git long paths to bypass path limit on Windows + run: git config --system core.longpaths true + - name: Check out the GMS2_Documentation repo + uses: actions/checkout@v3 + with: + path: Manual + token: ${{ secrets.GH_TOKEN }} + - name: Beta Builds + if: github.event.pull_request.base.ref == 'main' + run: build_robohelp_gh.bat %GITHUB_WORKSPACE%\output + shell: cmd + working-directory: Manual + - name: Non-Beta Builds + if: github.event.pull_request.base.ref == 'main' + run: build_robohelp_gh.bat %GITHUB_WORKSPACE%\output + shell: cmd + working-directory: Manual + - name: Upload robohelp zip file + uses: actions/upload-artifact@v2 + with: + name: YoYoStudioRoboHelp + path: output\RoboHelp + if-no-files-found: error + \ No newline at end of file diff --git a/build_robohelp_gh.bat b/build_robohelp_gh.bat index 782f14fe0..b89ccc9d4 100644 --- a/build_robohelp_gh.bat +++ b/build_robohelp_gh.bat @@ -67,6 +67,6 @@ rem append css fix to layout.css type "%basedir%RoboHelpFiles\layout_fix_append.css" >> "%DESTDIR%\RoboHelp\template\Charcoal_Grey\layout.css" @REM rem ************************************************** ZIP up the output -@REM pushd %DESTDIR%\RoboHelp -@REM 7z a YoYoStudioRoboHelp.zip . -r -@REM popd \ No newline at end of file +pushd %DESTDIR%\RoboHelp +7z a YoYoStudioRoboHelp.zip . -r +popd \ No newline at end of file