From 75deed93701930a2d58cdfbc4e970e772cce1145 Mon Sep 17 00:00:00 2001 From: Sander Declerck Date: Fri, 5 Sep 2025 12:01:29 +0200 Subject: [PATCH] Modify release process --- .github/workflows/build-and-release.yml | 15 ++++++++++++--- packages/safe-chain/.npmignore | 5 +++++ 2 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 packages/safe-chain/.npmignore diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index 455ccd6..213d1f9 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -27,15 +27,24 @@ jobs: version="${{ github.ref_name }}" echo "tag=$version" >> $GITHUB_OUTPUT - - name: Set the version - run: npm --no-git-tag-version version ${{ steps.get_version.outputs.tag }} + - name: Set the version in safe-chain package + run: npm --no-git-tag-version version ${{ steps.get_version.outputs.tag }} --workspace=packages/safe-chain - name: Install dependencies run: npm ci + - name: Run tests + run: npm run test + + - name: Copy documentation files to package + run: | + cp README.md packages/safe-chain/ + cp LICENSE packages/safe-chain/ + cp -r docs packages/safe-chain/ + - name: Publish to npm run: | echo "Publishing version ${{ steps.get_version.outputs.tag }} to NPM" - npm publish --access public + npm publish --workspace=packages/safe-chain --access public env: NPM_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} diff --git a/packages/safe-chain/.npmignore b/packages/safe-chain/.npmignore new file mode 100644 index 0000000..291e647 --- /dev/null +++ b/packages/safe-chain/.npmignore @@ -0,0 +1,5 @@ +# Test files +src/**/*.spec.js + +# Package files +*.tgz \ No newline at end of file