From ae5102fc892f170e64782bcaf09ed66a0cb7c59a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Emarianfoo=E2=80=9C?= <13335743+marianfoo@users.noreply.github.com> Date: Sun, 28 Jan 2024 19:56:24 +0100 Subject: [PATCH 1/3] chore: add release-please --- .github/workflows/release-please.yml | 37 ++++++++++++++++++++++++++++ .npmignore | 4 +++ .release-please-manifest.json | 4 +++ package.json | 8 ++++++ 4 files changed, 53 insertions(+) create mode 100644 .github/workflows/release-please.yml create mode 100644 .npmignore create mode 100644 .release-please-manifest.json diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..ce226ee --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,37 @@ +on: + push: + branches: + - main + +permissions: + contents: write + pull-requests: write + +name: release-please +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v4 + id: release + with: + release-type: node + manifest-file: .release-please-manifest.json + # The logic below handles the npm publication: + - uses: actions/checkout@v4 + # these if statements ensure that a publication only occurs when + # a new release is created: + if: ${{ steps.release.outputs.release_created }} + - uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: 'https://registry.npmjs.org' + if: ${{ steps.release.outputs.release_created }} + - run: npm install + if: ${{ steps.release.outputs.release_created }} + - run: npm run prepublish + if: ${{ steps.release.outputs.release_created }} + - run: npm publish --provenance + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + if: ${{ steps.release.outputs.release_created }} \ No newline at end of file diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..37e1f55 --- /dev/null +++ b/.npmignore @@ -0,0 +1,4 @@ +node_modules + +.vscode +.DS_Store diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..5c66571 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,4 @@ +{ + ".": "2.1.6" + } + \ No newline at end of file diff --git a/package.json b/package.json index fedf7f9..7bf995f 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,14 @@ "type": "git", "url": "git+https://github.com/geert-janklaps/cds-launchpad-plugin.git" }, + "files": [ + "dist", + "templates", + "cds-plugin.js", + "decs.d.ts", + "LICENSE", + "README.md" + ], "keywords": [ "cds", "cap", From 3bdcd10a010bf2506def3eac00960a3b5ee762ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Emarianfoo=E2=80=9C?= <13335743+marianfoo@users.noreply.github.com> Date: Sun, 28 Jan 2024 20:18:38 +0100 Subject: [PATCH 2/3] chore: add release-please --- .github/workflows/release-please.yml | 2 +- .github/workflows/test.yml | 2 +- package.json | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index ce226ee..5559617 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -31,7 +31,7 @@ jobs: if: ${{ steps.release.outputs.release_created }} - run: npm run prepublish if: ${{ steps.release.outputs.release_created }} - - run: npm publish --provenance + - run: npm publish env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} if: ${{ steps.release.outputs.release_created }} \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d984db0..2541f2a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ on: jobs: test: runs-on: ubuntu-latest - if: "github.event.pull_request.title != 'chore: release main'" + if: "!startsWith(github.event.pull_request.title, 'chore(main): release')" strategy: fail-fast: false diff --git a/package.json b/package.json index 7bf995f..d83bfcf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "cds-launchpad-plugin", - "version": "2.1.6", + "name": "@marianfoo/cds-launchpad-plugin", + "version": "2.2.0", "description": "Launchpad Plugin for demo / development / testing SAP CAP-based projects", "main": "dist/index.js", "types": "dist/index", From fb7802a683ebb14bc48b308746ec5b165a71f8a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Emarianfoo=E2=80=9C?= <13335743+marianfoo@users.noreply.github.com> Date: Sun, 28 Jan 2024 20:32:42 +0100 Subject: [PATCH 3/3] chore: revert package.json --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d83bfcf..7bf995f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "@marianfoo/cds-launchpad-plugin", - "version": "2.2.0", + "name": "cds-launchpad-plugin", + "version": "2.1.6", "description": "Launchpad Plugin for demo / development / testing SAP CAP-based projects", "main": "dist/index.js", "types": "dist/index",