From becaadf56805541ea8d7dda22ccb31fbafc93730 Mon Sep 17 00:00:00 2001 From: Fraser Benjamin Date: Mon, 8 Apr 2024 10:50:23 +0100 Subject: [PATCH] feat: main Updated publish flow Signed-off-by: Fraser Benjamin --- .github/workflows/publish.yml | 15 ++++++++++----- package-lock.json | 8 ++++---- package.json | 4 ++-- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bbd7c29..fef1077 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,6 +9,7 @@ jobs: issues: write pull-requests: write id-token: write + packages: write steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -16,9 +17,13 @@ jobs: node-version: '20.x' cache: 'npm' registry-url: 'https://registry.npmjs.org' + - uses: lego/mct-actions/actions/create-npmrc@1.2.2 + with: + github-repository-token: ${{ secrets.LEGO_GITHUB_PACKAGE_REGISTRY_TOKEN }} - run: npm ci - - name: Release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - run: npx semantic-release + - name: Publish Package + id: publish + uses: JS-DevTools/npm-publish@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + registry: https://npm.pkg.github.com diff --git a/package-lock.json b/package-lock.json index 9a609db..674706b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { - "name": "sqs-consumer", - "version": "10.0.0-canary.3", + "name": "@lego/sqs-consumer", + "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "sqs-consumer", - "version": "10.0.0-canary.3", + "name": "@lego/sqs-consumer", + "version": "1.0.0", "license": "Apache-2.0", "dependencies": { "@aws-sdk/client-sqs": "^3.529.1", diff --git a/package.json b/package.json index 8d0e32a..a1c3946 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "sqs-consumer", - "version": "10.0.0-canary.3", + "name": "@lego/sqs-consumer", + "version": "1.0.0", "description": "Build SQS-based Node applications without the boilerplate", "type": "module", "exports": {