From 9105575d8afd4a970f931e578c240d98fee10c03 Mon Sep 17 00:00:00 2001 From: Xi Zhang Date: Mon, 16 Oct 2023 17:33:56 -0500 Subject: [PATCH] test tags --- .github/workflows/publish.yaml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 4f54ee8a..1f977a98 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -1,22 +1,29 @@ name: publish -on: - push: - branches: main +on: pull_request +# on: +# push: +# tags: +# - clients/js/[0-9].[0-9]+.[0-9]+ +# - contracts/[0-9].[0-9]+.[0-9]+ +# - integrations/hardhat/[0-9].[0-9]+.[0-9]+ + +env: + NPM_PACKAGE: jobs: publish: runs-on: ubuntu-latest - strategy: - matrix: - package: [clients/js, integrations/hardhat, contracts] steps: + - name: Extract tagged package + run: echo "integrations/hardhat/1.2.1" | grep -oE '(clients/js|contracts|integrations/hardhat)' >> $NPM_PACKAGE - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: node-version: "18" - - name: Publish ${{ matrix.package }} to NPM + - name: Publish ${{ github.ref_name }} to NPM uses: JS-DevTools/npm-publish@v2 with: token: ${{ secrets.NPM_TOKEN }} - package: ${{ matrix.package }} + dry-run: true + package: ${{ NPM_PACKAGE }}