Skip to content

Commit

Permalink
💚 bump top revi by sh
Browse files Browse the repository at this point in the history
  • Loading branch information
trydofor committed Sep 29, 2024
1 parent 2cf13ed commit d9bbc87
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
13 changes: 13 additions & 0 deletions .changeset/bump-top.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

set -x -e
pnpm exec changeset status --output version-status.tmp
newv=$(jq -r '.releases[1].newVersion' version-status.tmp)

if [[ "$(uname)" == "Darwin" ]]; then
sed -i '' "s/\"version\": \".*\"/\"version\": \"$newv\"/" package.json
else
sed -i "s/\"version\": \".*\"/\"version\": \"$newv\"/" package.json
fi

pnpm exec changeset version
10 changes: 2 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:

- name: Install dependencies
run: |
chmod a+x .changeset/bump-top.sh
echo "install pnpm-hoist-layer to devDep"
pnpm -w i --no-frozen-lockfile --ignore-pnpmfile
echo "reset the ci lockfile"
Expand All @@ -52,20 +53,13 @@ jobs:
echo "- node: $(node -v)" >> $GITHUB_STEP_SUMMARY
echo "- pnpm: $(pnpm -v)" >> $GITHUB_STEP_SUMMARY
- name: Bump top-project version
run: |
pnpm exec changeset status --output version-status.tmp
newv=$(jq -r '.releases[1].newVersion' version-status.tmp)
sed -i "s/\"version\": \".*\"/\"version\": \"$new_version\"/" package.json
echo "- revi: $newv" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
- name: Update or Release
id: changesets
uses: changesets/action@v1
with:
commit: ":bookmark: update versions"
title: ":rocket: release versions"
version: .changeset/bump-top.sh
publish: pnpm pubs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit d9bbc87

Please sign in to comment.