From afc49ea949d72f65b574663fc9f8b8e0ddd01d12 Mon Sep 17 00:00:00 2001 From: Giles Roadnight Date: Fri, 20 May 2022 10:20:42 +0000 Subject: [PATCH 1/2] Update release process --- .github/workflows/create-release.yaml | 42 +++++++++++++++++++++++++++ .github/workflows/release.yml | 25 ---------------- 2 files changed, 42 insertions(+), 25 deletions(-) create mode 100644 .github/workflows/create-release.yaml delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/create-release.yaml b/.github/workflows/create-release.yaml new file mode 100644 index 0000000..1fe60dd --- /dev/null +++ b/.github/workflows/create-release.yaml @@ -0,0 +1,42 @@ +name: Create Release + +on: + push: + branches: [ main ] + workflow_dispatch: + +jobs: + build: + name: Create Release + runs-on: ubuntu-latest + steps: + + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup Node + uses: actions/setup-node@v2 + with: + node-version: '16.x' + + - name: Install node modules and verify build + run: npm ci && npm run build-release + + - name: Release + if: github.repository == 'morganstanley/needle' + uses: justincy/github-action-npm-release@2.0.2 + id: release + with: + token: ${{ secrets.RELEASE_TOKEN }} + + - name: Print release output + if: ${{ steps.release.outputs.released == 'true' }} + run: echo Release ID ${{ steps.release.outputs.release_id }} + + - name: Publish + if: steps.release.outputs.released == 'true' + uses: JS-DevTools/npm-publish@v1 + with: + token: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 2baa6ca..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: NPM Publish -on: - release: - types: [published] -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - # Setup .npmrc file to publish to npm - - uses: actions/setup-node@v2 - with: - node-version: '14.x' - registry-url: 'https://registry.npmjs.org' - - run: npm ci - - run: npm publish --access public - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - uses: JamesIves/github-pages-deploy-action@4.1.5 - with: - branch: gh-pages - folder: docs - - uses: codecov/codecov-action@v2 - with: - token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file From 819d91773b18746113f9b82b19124922b7029863 Mon Sep 17 00:00:00 2001 From: Giles Roadnight Date: Fri, 20 May 2022 10:20:50 +0000 Subject: [PATCH 2/2] 0.3.14 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7748873..0ac9a97 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@morgan-stanley/needle", - "version": "0.3.13", + "version": "0.3.14", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@morgan-stanley/needle", - "version": "0.3.13", + "version": "0.3.14", "license": "Apache-2.0", "dependencies": { "uuid": "^8.3.0" diff --git a/package.json b/package.json index 7253fd0..9c25ace 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "0.3.13", + "version": "0.3.14", "description": "A small & lightweight dependency injection container for use in multiple contexts like Angular, React & node.", "name": "@morgan-stanley/needle", "license": "Apache-2.0",