From c14ce22a51d7a933e5be4912ea382ffc7ab19f12 Mon Sep 17 00:00:00 2001 From: Alain Nicolas Date: Fri, 22 Mar 2024 16:02:45 +0100 Subject: [PATCH] feat: Snap deployment pipeline (#29) Co-authored-by: Mario Christopher --- .github/workflows/deploy-snap.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/deploy-snap.yml diff --git a/.github/workflows/deploy-snap.yml b/.github/workflows/deploy-snap.yml new file mode 100644 index 0000000..e2ca62e --- /dev/null +++ b/.github/workflows/deploy-snap.yml @@ -0,0 +1,29 @@ +name: Deploy Snap + +on: + workflow_dispatch: + +jobs: + deploy: + name: Deploy Snap + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v4 + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'yarn' + registry-url: 'https://registry.npmjs.org' + - name: Install npm dependencies + run: yarn --immutable + - name: Production Deployment + run: | + VERSION=$(node -p "require('./packages/snap/package.json').version") + + npm --prefix ./packages/snap version --new-version "${VERSION}" --no-git-tag-version --allow-same-version + yarn workspace @consensys/lxp-snap build + + npm publish ./packages/snap --tag latest --access public > /dev/null 2>&1 + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}