From 8508471c1757f3a5ec9b935c0fe6451491083596 Mon Sep 17 00:00:00 2001 From: Nils Haberkamp Date: Wed, 7 Feb 2024 10:36:50 +0100 Subject: [PATCH] NEXT-33446 - move publish to npm worflow of icon kit to root --- .github/workflows/npm-publish.yml | 24 ++++++++++++++- .../.github/workflows/npm-publish.yml | 30 ------------------- 2 files changed, 23 insertions(+), 31 deletions(-) delete mode 100644 packages/icon-kit/.github/workflows/npm-publish.yml diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index b7cc40eac..787335598 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -7,7 +7,6 @@ on: jobs: publish: - if: github.ref == 'refs/heads/main' runs-on: ubuntu-latest steps: - name: Checkout @@ -31,3 +30,26 @@ jobs: with: token: ${{ secrets.NPM_TOKEN }} access: 'public' + + publish-tokens: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v2 + with: + version: 8 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: lint + run: pnpm run lint:all --filter @shopware-ag/meteor-icon-kit + + - uses: JS-DevTools/npm-publish@v1 + with: + token: ${{ secrets.NPM_TOKEN }} + access: "public" diff --git a/packages/icon-kit/.github/workflows/npm-publish.yml b/packages/icon-kit/.github/workflows/npm-publish.yml deleted file mode 100644 index f7530730c..000000000 --- a/packages/icon-kit/.github/workflows/npm-publish.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Publish to NPM - -on: push - -jobs: - publish: - if: github.ref == 'refs/heads/main' - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Setup Node.js - uses: actions/setup-node@v2 - with: - node-version: 'lts/gallium' - - name: Retrieve the cached "node_modules" directory (if present) - uses: actions/cache@v2 - id: node-cache - with: - path: node_modules - key: node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }} - - name: Install dependencies (if the cached directory was not found) - if: steps.node-cache.outputs.cache-hit != 'true' - run: npm ci - - name: lint - run: npm run lint - - uses: JS-DevTools/npm-publish@v1 - with: - token: ${{ secrets.NPM_TOKEN }} - access: "public" \ No newline at end of file