From 9c0a23e7417e150c4550f317d32aee75aee19c2d Mon Sep 17 00:00:00 2001 From: Matthew Griffin Date: Fri, 28 Jun 2024 11:39:55 +0100 Subject: [PATCH] Add publish stage of the job with dry run status --- .github/workflows/publish-package.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index c69440fc..5b59c100 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -29,3 +29,19 @@ jobs: name: ${{env.PACKAGE_PREFIX}}${{env.VERSION}} path: ./dist/tech-carbon-estimator/${{env.PACKAGE_PREFIX}}${{env.VERSION}}.tgz overwrite: true #TODO - For testing, remove before final merge + + publish: + runs-on: ubuntu-latest + needs: package + steps: + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: 18 + - name: Download package + uses: actions/download-artifact@v4 + with: + name: ${{env.PACKAGE_PREFIX}}${{env.VERSION}} + - name: Publish to NPM registry + run: | + npm publish ${PACKAGE_PREFIX}${VERSION}.tgz --access public --dry-run