From d470dde4645fc619b6a283b36356adbbe2f9b7c3 Mon Sep 17 00:00:00 2001 From: Peter Warren Date: Wed, 15 Nov 2023 13:21:20 +1100 Subject: [PATCH] add archive step of new angular build github action add archive step of new angular build github action --- .github/workflows/build-package.yml | 36 +++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/build-package.yml diff --git a/.github/workflows/build-package.yml b/.github/workflows/build-package.yml new file mode 100644 index 00000000..258f1e5f --- /dev/null +++ b/.github/workflows/build-package.yml @@ -0,0 +1,36 @@ +name: Build package and archive + +on: + push: + branches: + - master + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + with: + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + - name: npm install and npm run CI commands + run: | + npm i + npm run build-dev + - name: Zip artifact for deployment + run: zip release.zip ./dist/* -r + - name: file bundle artifact + if: contains(github.ref, 'master') + uses: actions/upload-artifact@v2 + with: + name: portal UI dev bundle + path: release.zip