From ea192853539cf16a9b587cdf1032b30e1fc4031c Mon Sep 17 00:00:00 2001 From: Hongbo Miao Date: Sat, 30 Apr 2022 01:55:59 -0700 Subject: [PATCH] fix(release): add release.config.js --- .github/workflows/docker.yml | 2 +- .github/workflows/release.yml | 12 ++++++++++++ .github/workflows/test.yml | 8 ++++---- release.config.js | 5 +++++ 4 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 release.config.js diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index b6a79eaa4a..716d725254 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -236,9 +236,9 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Retrieve the secret and decode it to a file + working-directory: streaming/src/main/resources env: PROPERTIES_BASE64: ${{ secrets.HM_STEAMING_APPLICATION_PROPERTIES_BASE64 }} - working-directory: streaming/src/main/resources run: | echo $HM_STEAMING_APPLICATION_PROPERTIES_BASE64 | base64 --decode > application-production.properties - name: Build and push Docker image diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4c0c35fc64..14ef7778f6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,6 +18,18 @@ jobs: uses: actions/setup-node@v3 with: node-version: '16' + - name: Get npm cache directory + id: npm-cache-dir + run: | + echo "::set-output name=dir::$(npm config get cache)" + - name: Cache npm + uses: actions/cache@v3 + id: npm-cache + with: + path: ${{ steps.npm-cache-dir.outputs.dir }} + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- - name: Install dependencies run: | npm ci diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d5c4085b56..b536b4a02d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -350,10 +350,10 @@ jobs: npm run build - name: Lighthouse working-directory: web - run: | - npm run lighthouse env: LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }} + run: | + npm run lighthouse # https://www.chromatic.com/docs/github-actions web-storybook: @@ -521,10 +521,10 @@ jobs: cd api-node && npm ci - name: Stryker working-directory: api-node - run: | - npm run test:stryker env: STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} + run: | + npm run test:stryker streaming-test: name: Streaming - Test diff --git a/release.config.js b/release.config.js new file mode 100644 index 0000000000..8fe4da1bd6 --- /dev/null +++ b/release.config.js @@ -0,0 +1,5 @@ +// https://semantic-release.gitbook.io/semantic-release/usage/configuration + +module.exports = { + branches: ['main'], +};