From 9f4cd3252f9d1d5f669e90bd3bdc5dfe93230f8d Mon Sep 17 00:00:00 2001 From: Mat Date: Fri, 25 Oct 2024 15:27:31 -0700 Subject: [PATCH] ensure artifacts folder exists when deploying rust bindings --- .github/workflows/ci.yml | 22 +++++++++++++++++-- .../deploy-npm-ironfish-rust-nodejs.yml | 7 ++++++ 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 69c8ef0c10..5118da9ddc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,8 +5,8 @@ on: branches: - '**' push: - branches: - - master + # branches: + # - master jobs: lint: @@ -27,6 +27,24 @@ jobs: - name: Install packages run: yarn --non-interactive --ignore-scripts + - name: list files + run: ls + + # - name: folder doesnt exist + # run: | + # if [ -z "$(ls -A './artifacts')" ]; then + # echo "artifacts folder didnt exist" + # exit 1 + # fi + + - name: folder exists + run: | + mkdir artifacts + if [ -z "$(ls -A './artifacts')" ]; then + echo "artifacts folder existed, is empty" + exit 1 + fi + # Necessary since `--frozen-lockfile` does not work properly in yarn 1.x. # https://github.com/yarnpkg/yarn/issues/5840 - name: Check for lockfile changes diff --git a/.github/workflows/deploy-npm-ironfish-rust-nodejs.yml b/.github/workflows/deploy-npm-ironfish-rust-nodejs.yml index 9eedb960db..881c78d97d 100644 --- a/.github/workflows/deploy-npm-ironfish-rust-nodejs.yml +++ b/.github/workflows/deploy-npm-ironfish-rust-nodejs.yml @@ -42,6 +42,13 @@ jobs: run: ls -R . shell: bash + - name: Verify artifacts exist + run: | + if [ -z "$(ls -A './artifacts')" ]; then + echo "artifacts folder was empty. ironfish-rust-nodejs artifacts were not uploaded correctly." + exit 1 + fi + - name: Move and publish artifacts run: yarn artifacts