From 34e8cc99f62e36ca542c0449d8f621e3b2a837aa Mon Sep 17 00:00:00 2001 From: Marco Carrozzo Date: Thu, 15 Dec 2022 15:23:43 +0100 Subject: [PATCH] devel pipe --- .github/workflows/cron.yml | 6 +++- .github/workflows/release.yml | 56 +++++++++++++++++------------------ 2 files changed, 32 insertions(+), 30 deletions(-) diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index 43ab62f2bf..91bf9344f6 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -50,9 +50,13 @@ env: NODE_OPTIONS: "--max-old-space-size=5120" jobs: - test-everything: + run-e2e: uses: ./.github/workflows/pull-request.yml secrets: inherit + release: + uses: ./.github/workflows/release.yml + secrets: inherit + npm-check-bundle: # needs: [ test-everything ] timeout-minutes: 10 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fef5fe34b7..b67d50df2b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,7 @@ name: "release" on: + workflow_call: pull_request: types: [closed] branches: @@ -55,30 +56,26 @@ env: NODE_OPTIONS: "--max-old-space-size=5120" jobs: - build: - timeout-minutes: 20 - if: github.event.pull_request.merged == true - name: "Build Components" - runs-on: ubuntu-22.04 - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - uses: ./.github/actions/setup - - run: npm -v - - name: install - run: | - npm ci - nx run cli:bundle - nx run testing:bundle - - run: npx nx affected --target=lint $NX_CALCULATION_FLAGS - - run: nx affected:build $NX_CALCULATION_FLAGS --prod --exclude="demoshell" - - run: nx $NX_CALCULATION_FLAGS build demoshell --configuration production - - run: nx build demoshell --configuration production - - uses: ./.github/actions/upload-build-artifacts + # build: + # timeout-minutes: 20 + # if: github.event.pull_request.merged == true + # name: "Build Components" + # runs-on: ubuntu-22.04 + # steps: + # - name: Checkout repository + # uses: actions/checkout@v3 + # with: + # fetch-depth: 0 + # - uses: ./.github/actions/setup + # - run: npm -v + # - name: install + # run: | + # npm ci + # nx run cli:bundle + # nx run testing:bundle + # - uses: ./.github/actions/upload-build-artifacts - push-demoshell: + release-demoshell: needs: [build] timeout-minutes: 10 if: github.event.pull_request.merged == true @@ -100,11 +97,10 @@ jobs: run: | nx build demoshell --configuration production . ./scripts/travis/release/docker-tag.sh - echo $TAGS - set -u; + echo $TAGS ./scripts/travis/release/release-demoshell-docker.sh - push-storybook: + release-storybook: needs: [build] timeout-minutes: 10 if: github.event.pull_request.merged == true @@ -125,8 +121,7 @@ jobs: run: | nx run stories:build-storybook --configuration ci . ./scripts/travis/release/docker-tag.sh - echo $TAGS - set -u; + echo $TAGS ./scripts/travis/release/release-storybook-docker.sh npm-release: @@ -166,4 +161,7 @@ jobs: with: fetch-depth: 0 - uses: ./.github/actions/download-build-artifacts - - uses: ./.github/actions/npm-check-bundle \ No newline at end of file + - name: Check npm bundle + run: | + export ADF_VERSION=$(npm view @alfresco/adf-core@${TAG_NPM} version) + ./scripts/travis/build/npm-check-bundles.sh -v ${ADF_VERSION}