Skip to content

Commit c3efa1f

Browse files
bors[bot]bidoubiwacurquiza
authored
Merge #90
90: Update README/CONTRIBUTING and npm package r=bidoubiwa a=bidoubiwa Before open PR: - FInish README - Update Contributing fixes: #24 -> release drafter fixes: #23 -> SDK conform headers fixes: #21 -> Update Contributing Co-authored-by: Charlotte Vermandel <[email protected]> Co-authored-by: cvermand <[email protected]> Co-authored-by: Clémentine Urquizar <[email protected]>
2 parents d3a4491 + cc97a13 commit c3efa1f

File tree

15 files changed

+419
-53
lines changed

15 files changed

+419
-53
lines changed

.github/release-draft-template.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name-template: 'v$RESOLVED_VERSION 🚀'
2+
tag-template: 'v$RESOLVED_VERSION'
3+
exclude-labels:
4+
- 'skip-changelog'
5+
version-resolver:
6+
minor:
7+
labels:
8+
- 'breaking-change'
9+
default: patch
10+
categories:
11+
- title: 'Breaking changes ⚠️'
12+
label: 'breaking-change'
13+
template: |
14+
## Changes
15+
16+
$CHANGES
17+
18+
Thanks again to $CONTRIBUTORS! 🎉
19+
no-changes-template: 'Changes are coming soon 😎'
20+
sort-direction: 'ascending'
21+
replacers:
22+
- search: '/(?:and )?@dependabot-preview(?:\[bot\])?,?/g'
23+
replace: ''
24+
- search: '/(?:and )?@dependabot(?:\[bot\])?,?/g'
25+
replace: ''
26+
- search: '/(?:and )?@bors(?:\[bot\])?,?/g'
27+
replace: ''
28+
- search: '/(?:and )?@meili-bot,?/g'
29+
replace: ''

.github/scripts/check-release.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/sh
2+
3+
# Checking if current tag matches the package version
4+
current_tag=$(echo $GITHUB_REF | tr -d 'refs/tags/v')
5+
file_tag=$(grep '"version":' package.json | cut -d ':' -f 2- | tr -d ' ' | tr -d '"' | tr -d ',')
6+
if [ "$current_tag" != "$file_tag" ]; then
7+
echo "Error: the current tag does not match the version in package file(s)."
8+
echo "$current_tag vs $file_tag"
9+
exit 1
10+
fi
11+
12+
echo 'OK'
13+
exit 0

.github/workflows/publish.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: publish to npm
2+
on:
3+
push:
4+
tags:
5+
- v*
6+
7+
jobs:
8+
publish-npm:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-node@v1
13+
with:
14+
node-version: 12
15+
registry-url: https://registry.npmjs.org/
16+
- name: Check release validity
17+
run: sh .github/scripts/check-release.sh
18+
- name: Publish
19+
run: npm publish .
20+
env:
21+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
update_release_draft:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: release-drafter/release-drafter@v5
13+
with:
14+
config-name: release-draft-template.yml
15+
env:
16+
GITHUB_TOKEN: ${{ secrets.RELEASE_DRAFTER_TOKEN }}

CONTRIBUTING.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,17 @@ If you already have a running Strapi app in local, testing is possible with the
6060
yarn cy:open
6161
```
6262

63-
### Playgrounds
63+
### Run Playground
6464

6565
To test directly your changes on the plugin in Strapi, you can run the Strapi playground:
6666

6767
```bash
68+
# Root of repository
6869
yarn playground:dev
6970
```
7071

72+
This command will install required dependencies and launch the app in development mode. You should be able to reach it on the [port 8000 of your localhost](http://localhost:8000/admin/).
73+
7174
## Git Guidelines
7275

7376
### Git Branches <!-- omit in toc -->
@@ -104,6 +107,25 @@ MeiliSearch tools follow the [Semantic Versioning Convention](https://semver.org
104107
This project integrates a bot that helps us manage pull requests merging.<br>
105108
_[Read more about this](https://github.com/meilisearch/integration-guides/blob/main/guides/bors.md)._
106109

110+
### Automated Changelogs
111+
112+
This project integrates a tool to create automated changelogs.<br>
113+
_[Read more about this](https://github.com/meilisearch/integration-guides/blob/main/guides/release-drafter.md)._
114+
115+
### How to Publish the Release
116+
117+
⚠️ Before doing anything, make sure you got through the guide about [Releasing an Integration](https://github.com/meilisearch/integration-guides/blob/main/guides/integration-release.md).
118+
119+
Make a PR modifying the file [`package.json`](/package.json) with the right version.
120+
121+
```javascript
122+
"version": "X.X.X",
123+
```
124+
125+
Once the changes are merged on `main`, you can publish the current draft release via the [GitHub interface](https://github.com/meilisearch/strapi-plugin-meilisearch/releases).
126+
127+
GitHub Actions will be triggered and push the package to [npm](https://www.npmjs.com/package/strapi-plugin-meilisearch).
128+
107129
<hr>
108130

109131
Thank you again for reading this through, we can not wait to begin to work with you if you made your way through this contributing guide ❤️

0 commit comments

Comments
 (0)