Skip to content

Commit

Permalink
chore: add release please (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
marianfoo authored Jan 29, 2024
1 parent 7f8f074 commit cd401a5
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -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
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
if: ${{ steps.release.outputs.release_created }}
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules

.vscode
.DS_Store
4 changes: 4 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
".": "2.1.6"
}

8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit cd401a5

Please sign in to comment.