From 7cfb2877aba9c5a9c9e88393aabb94b3e1315987 Mon Sep 17 00:00:00 2001 From: Dave Mihalcik <38867245+dmihalcik-virtru@users.noreply.github.com> Date: Wed, 17 Aug 2022 11:11:12 -0400 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=90=9B=20Fix=20npm=20publish=20step?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds the npm registry as described in https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages#publishing-packages-to-the-npm-registry --- .github/workflows/build.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e4ab601c..b3f605e1 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -253,6 +253,7 @@ jobs: - uses: actions/setup-node@v2 with: node-version: '16.x' + registry-url: 'https://registry.npmjs.org' - run: |- if [[ ${{ github.ref }} = refs/heads/release/* ]]; then scripts/check-version-is.sh "${GITHUB_REF##*release/}" From 3779db9e7a0d11467065c640aeb52bef32224f09 Mon Sep 17 00:00:00 2001 From: David Mihalcik Date: Fri, 19 Aug 2022 15:00:29 -0400 Subject: [PATCH 2/2] Update build.yaml --- .github/workflows/build.yaml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b3f605e1..110dbc43 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -6,15 +6,15 @@ on: branches: - main - release/[0-9]+.[0-9]+.[0-9]+ - tags: - - v[0-9]+.[0-9]+.[0-9]+ - + release: + types: [created] jobs: lib: runs-on: ubuntu-latest defaults: run: working-directory: ./lib + timeout-minutes: 5 steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 @@ -44,6 +44,7 @@ jobs: defaults: run: working-directory: ./cli + timeout-minutes: 5 steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 @@ -77,6 +78,7 @@ jobs: defaults: run: working-directory: ./sample-web-app + timeout-minutes: 5 steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 @@ -100,6 +102,7 @@ jobs: defaults: run: working-directory: .github/workflows + timeout-minutes: 5 steps: - uses: actions/checkout@v2 - uses: mig4/setup-bats@v1 @@ -164,6 +167,7 @@ jobs: defaults: run: working-directory: .github/workflows/roundtrip + timeout-minutes: 45 steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 @@ -209,8 +213,9 @@ jobs: tilt ci --file opentdf/quickstart/Tiltfile deliver-ghp: - runs-on: ubuntu-latest needs: [lib, cli, sample-web-app, scripts] + runs-on: ubuntu-latest + timeout-minutes: 5 # To publish from a release or feature branch, remove the ref == condition below if: github.event_name == 'push' && github.ref == 'refs/heads/main' steps: @@ -245,8 +250,12 @@ jobs: deliver-npmjs: runs-on: ubuntu-latest + timeout-minutes: 5 environment: npmjs - if: github.event_name == 'push' && github.ref == 'refs/heads/main' + if: >- + (github.event_name == 'push' && github.ref == 'refs/heads/main') + || (github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release/')) + || (github.event_name == 'release' && startsWith(github.ref, 'refs/tags/')) needs: deliver-ghp steps: - uses: actions/checkout@v2