Skip to content

Commit cf02f2c

Browse files
committed
Update Contributing missing publish
1 parent 32975ed commit cf02f2c

File tree

3 files changed

+33
-5
lines changed

3 files changed

+33
-5
lines changed

.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: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,8 @@ jobs:
1313
with:
1414
node-version: 12
1515
registry-url: https://registry.npmjs.org/
16-
- name: Install dependencies
17-
run: yarn install
18-
- name: Build
19-
run: yarn build
2016
- name: Check release validity
21-
run: sh scripts/check-release.sh
17+
run: sh .github/scripts/check-release.sh
2218
- name: Publish
2319
run: npm publish .
2420
env:

CONTRIBUTING.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,25 @@ MeiliSearch tools follow the [Semantic Versioning Convention](https://semver.org
107107
This project integrates a bot that helps us manage pull requests merging.<br>
108108
_[Read more about this](https://github.com/meilisearch/integration-guides/blob/main/guides/bors.md)._
109109

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+
110129
<hr>
111130

112131
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)