-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added GitHub action to verify major and minor versions
- Loading branch information
1 parent
8cea811
commit 9474918
Showing
4 changed files
with
37 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ on: | |
push: | ||
branches: | ||
- main | ||
- 0.6.0 | ||
|
||
concurrency: | ||
group: "publish" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Verify major and minor versions | ||
|
||
on: push | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
version: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Check versions | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: | | ||
echo "Verifying that all packages have the same major and minor version (patch version can be different)..." | ||
version_base=$(cat package.json | jq '.version' --raw-output) | ||
version_base=${version_base%.*} | ||
echo "Base Version: $version_base" | ||
find . -name "package.json" -type f -not -path "*/node_modules/*" -not -path "*/.next/*" -not -path "*/state/*" | sort | while read -r file; do | ||
name_pkg=$(cat $file | jq '.name' --raw-output) | ||
version_pkg=$(cat $file | jq '.version' --raw-output) | ||
version_pkg="${version_pkg%.*}" | ||
if [ "$version_base" != "$version_pkg" ]; then | ||
echo "$name_pkg: $version_pkg (mismatch!)" | ||
exit 1 | ||
else | ||
echo "$name_pkg: \xE2\x9C\x94" | ||
fi | ||
done |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters